Updated Upstream and Sidestream(s) (Paper/Tuinity/Airplane/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:
0641de2d4 [CI-SKIP] Change some fields to textara (#5405)
98a34ea47 [CI-SKIP] 🚀 Upgrade to new form-based templates (#5278)
bca97a8f7 replace spaces in world key (touches #5397)
de94f6485 Refactor chat message composition (#5396)
e27f334bb [CI-SKIP] Fix makemcdevsrc.sh for nms relocations (#5389)
ae15e85da Updated Upstream (CraftBukkit)
26fe0ac5a Only set despawnTimer for Wandering Traders spawned by MobSpawnerTrader (#5391)
b748eb7b8 Fix VanillaMobGoalTest#testBukkitMap (#5390)
18dbbb578 [Auto] Updated Upstream (CraftBukkit)
fac9cc5d5 [CI-SKIP] Ignore .gitignore
087aa70e7 Deprecate ItemStack#setLore(List<String>) and ItemStack#getLore, add Component based alternatives
9889c651c apply fixup
c310f0a61 Updated Upstream (Bukkit/CraftBukkit)
f17560ab0 wtf is this t file -jmp
347f3a9b8 fix compile
700e9e6a5 rebase
cf4dc464a Revert de5f4e469...c270abe96
6870db613 script & POM fix
743c6533c Replace ** with * (BSD/macOS)
376d7b097 Don't remove the .java
fcb3fd42a Fix macOS/BSD support
8cfc05249 Link correctly
ba1031ca7 Rename work dir
c8d844ab7 Actually fix preloading this time
e62aa5e3e Fix class preloading
1c03cf898 It's mojang math, not minecraft math
1034873df Apply fixups
39b125771 Use revision file
956150da7 Welcome to 1.16.5-R0.2
ccb217c01 Change cache keys
0d217001c more work
f6d820f07 It compiles
0f78e9525 More work
1718f61bf Updated Upstream (CraftBukkit/Spigot)
b28d46114 Update scripts for NMS repackaging
d4532f7e7 bug #5373 - fix AsyncChatEvent not being posted when processing a legacy APCE continuation
522ae1c51 Replace all block states of a specified block (#5055)
1cda67118 [Auto] Updated Upstream (CraftBukkit)
8c74d3126 Updated Upstream (Bukkit) (#5359)
fd3c66a91 bug #5362 - correctly pass "render type" when registering a new scoreboard objective

Tuinity Changes:
9bdcb9b Delete work dir when running jar
6351d7c Updated Upstream (Paper)
932c199 Generate mc-dev correctly
bf3e737 Make packet limiter work from IDE
1686f38 Fix packet limiter config
f40f7b4 Update README.md styling (#264)
da1c3ac GH Actions Changes (#213)
5f325ec Updated Upstream (Paper)
0f83fe4 Updated Upstream (Paper)
44e8e5d Do not load extra radius of chunks when loading a single chunk
31f9cae Revert custom table implementation for blockstate states
9ac33d1 Be aware of entity teleports when chunk checking entities
18c7f3f Always set impulse for projectiles to true, even if hit event failed

Airplane Changes:
f94d399 Merge pull request #18 from notOM3GA/upstream/nms-repackage
0fc6226 Force build for Flare update
08439d6 Updated Upstream (Tuinity)
0f80443 Updated Upstream (Tuinity)
2f6cbdc More debug for plugins not shutting down tasks
12e1b61 Updated Upstream (Tuinity)
fc778d3 Update README.md
db6b0eb Merge pull request #16 from DeadSteve51/patch-2
b23bee3 Remove debug
8157e98 Config style, flare style, disable tracker by def
98d0b58 Updates to README

Purpur Changes:
75b07a0 Fix stack overflow on armorstand movement
f754a7b Sneak to bulk process composter
1362f49 Updated Upstream (Paper, Tuinity, & Airplane)
5bf8615 [ci-skip] Conflict on change for adventure deprecations
114b37b Add purpur.yml to Flare (#204)
c6dce38 forgot the crops
c004236 Configurable ravager griefable blocks list
766246a [ci-skip] remove duplicate patch
ac93477 Config to make Creepers explode on death (#201)
297181e Updated Upstream (Paper, Tuinity, & Airplane)
45b9a18 Config to disable Llama caravans (#203)
a99a83b Allow fully disabling farmland trampling
3aa4f68 Tick fluids config
0e34d59 Add missing imports :/
3dd9f46 Updated Upstream (Paper, Tuinity, & Airplane)

Empirecraft Changes:
1b579407 Improve importmcdev script and fix first server patch
f597a82e Update generatesources script
218f5298 Fix patches - imported files
847cf558 Updated Paper
d51410c3 Updated Paper
fb3301fd Fix bow entity ai speed/distance
dbde1dc4 Add isJoined boolean to fake players
a23317f7 Update Fake Player API - misc changes
a970b77f Updated Paper
This commit is contained in:
Simon Gardling 2021-03-22 16:12:24 -04:00
parent 9168211946
commit 111636ecc3
381 changed files with 15791 additions and 12728 deletions

View File

@ -8,22 +8,22 @@ # Patches
| Side | Patch | Author | CoAuthors |
| ----- | ------------- |:-------------:| -----:|
| api | AFK API | William Blake Galbreath | |
| server | AFK API | William Blake Galbreath | |
| api | AFK API | William Blake Galbreath | |
| server | Ability to re-add farmland mechanics from Alpha | Yive | |
| server | Actually unload POI data | Spottedleaf | |
| server | Add /ping command | William Blake Galbreath | |
| server | Add 5 second tps average in /tps | William Blake Galbreath | |
| api | Add ChatColor.getById | Aikar | |
| api | Add EntityTeleportHinderedEvent | Mariell Hoversholm | |
| server | Add EntityTeleportHinderedEvent | Mariell Hoversholm | |
| api | Add GameProfileLookupEvent | tr7zw | |
| api | Add EntityTeleportHinderedEvent | Mariell Hoversholm | |
| server | Add GameProfileLookupEvent | tr7zw | |
| api | Add GameProfileLookupEvent | tr7zw | |
| server | Add IntelliJ IDEA runnable | Zoe | |
| api | Add NBT API as a first-class lib | tr7zw | |
| server | Add NBT API as a first-class lib | tr7zw | |
| api | Add StructureGenerateEvent | Nahuel | Mariell Hoversholm |
| api | Add NBT API as a first-class lib | tr7zw | |
| server | Add StructureGenerateEvent | Nahuel | Mariell Hoversholm |
| api | Add StructureGenerateEvent | Nahuel | Mariell Hoversholm |
| server | Add Velocity natives for encryption and compression | Andrew Steinborn | |
| server | Add adjustable breeding cooldown to config | montlikadani | |
| server | Add allow water in end world option | William Blake Galbreath | |
@ -32,13 +32,13 @@ # Patches
| 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 | |
| api | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | |
| server | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | |
| api | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | |
| server | Add demo command | BillyGalbreath | |
| server | Add enderman and creeper griefing controls | William Blake Galbreath | |
| server | Add ghast allow-griefing option | BillyGalbreath | |
| api | Add last tick time API | Ivan Pekov | tr7zw |
| server | Add last tick time API | Ivan Pekov | tr7zw |
| api | Add last tick time API | Ivan Pekov | tr7zw |
| server | Add mobGriefing bypass to everything affected | Encode42 | |
| server | Add no-tick block list | William Blake Galbreath | |
| server | Add nspt command | Ivan Pekov | |
@ -48,27 +48,28 @@ # Patches
| server | Add option to disable dolphin treasure searching | William Blake Galbreath | |
| server | Add option to disable mushroom block updates | William Blake Galbreath | |
| server | Add option to disable observer clocks | Phoenix616 | |
| api | Add option to disable zombie aggressiveness towards villagers | nitricspace | |
| server | Add option to disable zombie aggressiveness towards villagers | nitricspace | |
| api | Add option to disable zombie aggressiveness towards villagers | nitricspace | |
| server | Add option to set armorstand step height | William Blake Galbreath | |
| server | Add option to teleport to spawn if outside world border | William Blake Galbreath | |
| server | Add packet limiter config | Spottedleaf | |
| server | Add permission for F3+N debug | William Blake Galbreath | |
| server | Add phantom spawning options | William Blake Galbreath | |
| server | Add player death exp control options | William Blake Galbreath | |
| api | Add predicate to recipe&#39;s ExactChoice ingredient | William Blake Galbreath | |
| server | Add predicate to recipe&#39;s ExactChoice ingredient | William Blake Galbreath | |
| api | Add predicate to recipe&#39;s ExactChoice ingredient | William Blake Galbreath | |
| server | Add soft async catcher | Spottedleaf | |
| server | Add tablist suffix option for afk | montlikadani | |
| server | Add timings for Behavior | Phoenix616 | |
| server | Add timings for Pathfinder | MrIvanPlays | |
| server | Add twisting and weeping vines growth rates | BillyGalbreath | |
| api | Add unsafe Entity serialization API | Mariell Hoversholm | |
| server | Add unsafe Entity serialization API | Mariell Hoversholm | |
| api | Add unsafe Entity serialization API | Mariell Hoversholm | |
| server | Add vindicator johnny spawn chance | William Blake Galbreath | |
| server | Add wither skeleton takes wither damage option | William Blake Galbreath | |
| api | Advancement API | William Blake Galbreath | |
| server | Advancement API | William Blake Galbreath | |
| api | Advancement API | William Blake Galbreath | |
| server | Airplane Branding Changes | Paul Sauve | |
| server | Airplane Configuration | Paul Sauve | |
| server | Airplane MC Dev Fixes | Paul Sauve | |
| server | Airplane Profiler | Paul Sauve | |
@ -84,18 +85,19 @@ # Patches
| server | Allow toggling special MobSpawners per world | jmp | |
| api | Alphabetize in-game /plugins list | BillyGalbreath | |
| server | Alternative Keepalive Handling | William Blake Galbreath | |
| api | Anvil API | William Blake Galbreath | |
| server | Anvil API | William Blake Galbreath | |
| api | Anvil API | William Blake Galbreath | |
| server | Apply display names from item forms of entities to entities | jmp | |
| server | Arrows should not reset despawn counter | William Blake Galbreath | |
| server | Attempt to recalculate regionfile header if it is corrupt | Spottedleaf | |
| server | Avoid double I/O operation on load player file | ㄗㄠˋ ㄑㄧˊ | |
| server | Barrels and enderchests 6 rows | William Blake Galbreath | |
| server | Be aware of entity teleports when chunk checking entities | Spottedleaf | |
| server | Brand changes | Spottedleaf | |
| server | Brandings | YatopiaMC | |
| server | Breedable Polar Bears | William Blake Galbreath | |
| api | Bring back server name | William Blake Galbreath | |
| server | Bring back server name | William Blake Galbreath | |
| api | Bring back server name | William Blake Galbreath | |
| server | Cache entityhuman display name | Paul Sauve | |
| server | Cache palette array | Paul Sauve | |
| server | Cat spawning options | William Blake Galbreath | |
@ -109,8 +111,10 @@ # Patches
| server | Config migration: disable saving projectiles to disk -&gt; | jmp | |
| server | Config to allow Note Block sounds when blocked | Encode42 | |
| server | Config to always tame in Creative | Encode42 | |
| server | Config to disable Llama caravans | Encode42 | |
| server | Config to ignore Dragon Head wearers and stare aggro | Encode42 | |
| server | Config to ignore nearby mobs when sleeping | Encode42 | |
| server | Config to make Creepers explode on death | 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 | |
@ -128,10 +132,12 @@ # Patches
| server | Configurable jockey options | William Blake Galbreath | |
| server | Configurable movement checks | l_MrBoom_l | |
| api | Configurable permission message upgrades | William Blake Galbreath | |
| server | Configurable ravager griefable blocks list | BillyGalbreath | |
| server | Configurable server mod name | William Blake Galbreath | |
| server | Configurable villager brain ticks | William Blake Galbreath | |
| server | Configurable villager breeding | draycia | |
| server | Configurable void damage height | William Blake Galbreath | |
| api | Conflict on change for adventure deprecations | BillyGalbreath | |
| server | Consolidate flush calls for entity tracker packets | Spottedleaf | |
| server | Controllable Minecarts | William Blake Galbreath | |
| server | Copy passenger list in enderTeleportTo | Spottedleaf | |
@ -166,8 +172,8 @@ # Patches
| server | Dont send useless entity packets | William Blake Galbreath | |
| server | Dynamic activation range | Paul Sauve | |
| server | EMC - Configurable disable give dropping | Aikar | |
| api | EMC - MonsterEggSpawnEvent | Aikar | |
| server | EMC - MonsterEggSpawnEvent | Aikar | |
| api | EMC - MonsterEggSpawnEvent | Aikar | |
| server | Early return optimization for target finding | Paul Sauve | |
| server | End crystal explosion options | Ben Kerllenevich | |
| server | End gateway should check if entity can use portal | William Blake Galbreath | |
@ -198,8 +204,8 @@ # Patches
| server | Fix the dead lagging the server | William Blake Galbreath | |
| server | Fix vanilla command permission handler | William Blake Galbreath | |
| server | Flying squids! Oh my! | William Blake Galbreath | |
| api | Full netherite armor grants fire resistance | BillyGalbreath | |
| server | Full netherite armor grants fire resistance | BillyGalbreath | |
| api | Full netherite armor grants fire resistance | BillyGalbreath | |
| server | Giants AI settings | William Blake Galbreath | |
| server | Global Eula file | tr7zw | |
| server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn |
@ -220,24 +226,24 @@ # Patches
| server | Improved oversized chunk data packet handling | Spottedleaf | |
| server | Infinite fuel furnace | William Blake Galbreath | |
| server | Infinity bow settings | William Blake Galbreath | |
| api | Item entity immunities | William Blake Galbreath | |
| server | Item entity immunities | William Blake Galbreath | |
| api | Item entity immunities | William Blake Galbreath | |
| server | Item stuck sleep config | tr7zw | |
| api | ItemFactory#getMonsterEgg | William Blake Galbreath | |
| server | ItemFactory#getMonsterEgg | William Blake Galbreath | |
| api | ItemFactory#getMonsterEgg | William Blake Galbreath | |
| api | ItemStack convenience methods | William Blake Galbreath | |
| server | Kelp weeping and twisting vines configurable max growth age | BillyGalbreath | |
| server | Lag compensate block breaking | Spottedleaf | |
| api | Lagging threshold | William Blake Galbreath | |
| server | Lagging threshold | William Blake Galbreath | |
| api | Left handed API | BillyGalbreath | |
| api | Lagging threshold | William Blake Galbreath | |
| server | Left handed API | BillyGalbreath | |
| api | LivingEntity safeFallDistance | William Blake Galbreath | |
| api | Left handed API | BillyGalbreath | |
| server | LivingEntity safeFallDistance | William Blake Galbreath | |
| api | LivingEntity#broadcastItemBreak | William Blake Galbreath | |
| api | LivingEntity safeFallDistance | William Blake Galbreath | |
| server | LivingEntity#broadcastItemBreak | William Blake Galbreath | |
| api | Llama API | William Blake Galbreath | |
| api | LivingEntity#broadcastItemBreak | William Blake Galbreath | |
| server | Llama API | William Blake Galbreath | |
| api | Llama API | William Blake Galbreath | |
| server | Lobotomize stuck villagers | BillyGalbreath | |
| server | Logger settings (suppressing pointless logs) | William Blake Galbreath | |
| server | MC-147659 - Fix non black cats spawning in swamp huts | William Blake Galbreath | |
@ -251,10 +257,11 @@ # Patches
| server | Make sure inlined getChunkAt has inlined logic for loaded | Spottedleaf | |
| server | Manually inline methods in BlockPosition | Spottedleaf | |
| server | Mending mends most damages equipment first | William Blake Galbreath | |
| api | Modify POM | YatopiaMC | |
| server | Modify POM | YatopiaMC | |
| api | Modify POM | YatopiaMC | |
| server | Modify default configs | tr7zw | |
| server | Movement options for armour stands | Mariell Hoversholm | |
| server | More debug for plugins not shutting down tasks | Paul Sauve | |
| server | Movement options for armor stands | Mariell Hoversholm | |
| server | Multi-Threaded Server Ticking Vanilla | Spottedleaf | |
| server | Multi-Threaded ticking CraftBukkit | Spottedleaf | |
| server | Multithreaded entity tracking | Paul Sauve | |
@ -295,18 +302,18 @@ # Patches
| api | Per player viewdistances | Spottedleaf | |
| server | Persistent TileEntity Lore and DisplayName | jmp | |
| server | Phantom flames on swoop | BillyGalbreath | |
| api | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | |
| server | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | |
| api | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | |
| server | Phantoms burn in light | draycia | |
| server | Pigs give saddle back | William Blake Galbreath | |
| api | Player invulnerabilities | William Blake Galbreath | |
| server | Player invulnerabilities | William Blake Galbreath | |
| api | PlayerAttackEntityEvent | Ivan Pekov | |
| api | Player invulnerabilities | William Blake Galbreath | |
| server | PlayerAttackEntityEvent | Ivan Pekov | |
| api | PlayerBookTooLargeEvent | BillyGalbreath | |
| api | PlayerAttackEntityEvent | Ivan Pekov | |
| server | PlayerBookTooLargeEvent | BillyGalbreath | |
| api | PlayerSetSpawnerTypeWithEggEvent | William Blake Galbreath | |
| api | PlayerBookTooLargeEvent | BillyGalbreath | |
| server | PlayerSetSpawnerTypeWithEggEvent | William Blake Galbreath | |
| api | PlayerSetSpawnerTypeWithEggEvent | William Blake Galbreath | |
| server | Players should not cram to death | William Blake Galbreath | |
| server | Populator seed controls | Spottedleaf | |
| server | Preload ProtocolLib EnumWrappers | ishland | |
@ -314,8 +321,8 @@ # Patches
| server | Prevent long map entry creation in light engine | Spottedleaf | |
| server | Prevent unload() calls removing tickets for sync loads | Spottedleaf | |
| server | Properly handle cancellation of projectile hit event | Spottedleaf | |
| api | Purpur config files | William Blake Galbreath | |
| server | Purpur config files | William Blake Galbreath | |
| api | Purpur config files | William Blake Galbreath | |
| server | Rabbit naturally spawn toast and killer | William Blake Galbreath | |
| api | Rabid Wolf API | Encode42 | |
| server | Raid cooldown setting | jmp | |
@ -340,8 +347,8 @@ # Patches
| server | Revert getChunkAt(Async) retaining chunks for long periods of | Spottedleaf | |
| server | Rework PlayerChunk main thread checks | Spottedleaf | |
| server | Rewrite the light engine | Spottedleaf | |
| api | Ridables | William Blake Galbreath | |
| server | Ridables | William Blake Galbreath | |
| api | Ridables | William Blake Galbreath | |
| server | Send full pos packets for hard colliding entities | Spottedleaf | |
| server | Separate lookup locking from state access in UserCache | Spottedleaf | |
| server | Set name visible when using a Name Tag on an Armor Stand | jmp | |
@ -356,6 +363,7 @@ # Patches
| server | Skip events if there&#39;s no listeners | William Blake Galbreath | |
| server | Smarter statistics ticking | Mykyta Komarnytskyy | |
| server | Smol entity optimisations | Ivan Pekov | |
| server | Sneak to bulk process composter | BillyGalbreath | |
| server | Snow Golem rate of fire config | Simon Gardling | |
| server | Snowman drop and put back pumpkin | William Blake Galbreath | |
| api | Spigot - Improve output of plugins command | Parker Hawke | |
@ -366,17 +374,18 @@ # Patches
| server | Stop wasting resources on JsonList#get | Ivan Pekov | |
| server | Striders give saddle back | Ben Kerllenevich | |
| server | Strip raytracing for EntityLiving#hasLineOfSight | Paul Sauve | |
| api | Suspected plugins report | ishland | |
| server | Suspected plugins report | ishland | |
| api | Suspected plugins report | ishland | |
| server | Swap priority of checks in chunk ticking | Paul Sauve | |
| server | Swaps the predicate order of collision | ㄗㄠˋ ㄑㄧˊ | |
| server | Tick fluids config | BillyGalbreath | |
| server | Time scoreboard search | Spottedleaf | |
| server | Timings stuff | William Blake Galbreath | |
| server | Toggle for Zombified Piglin death always counting as player | jmp | |
| server | Toggle for water sensitive mob damage | YouHaveTrouble | |
| server | Totems work in inventory | draycia | |
| api | Tuinity POM Changes | Spottedleaf | |
| server | Tuinity POM Changes | Spottedleaf | |
| api | Tuinity POM Changes | Spottedleaf | |
| server | Tuinity Server Config | Spottedleaf | |
| api | Tuinity config | Spottedleaf | |
| server | Tulips change fox type | William Blake Galbreath | |

2
Paper

@ -1 +1 @@
Subproject commit 39c487b37d51944997aa2eea8ce62e3f5bc07d52
Subproject commit 0641de2d4f4a2802980140e4980c1d7eaf141a66

View File

@ -1,7 +1,8 @@
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 xyz.jpenilla.toothpick.transformer.ModifiedLog4j2PluginsCacheFileTransformer
import transformer.ModifiedLog4j2PluginsCacheFileTransformer
import relocation.ToothpickRelocator
import kotlinx.dom.elements
import kotlinx.dom.parseXml
import kotlinx.dom.search
@ -148,8 +149,7 @@ private fun Project.configureServerProject() {
destination = project.buildDir.resolve("tmp/pom.xml")
}
@Suppress("UNUSED_VARIABLE")
val test by tasks.getting(Test::class) {
tasks.withType<Test> {
// didn't bother to look into why these fail. paper excludes them in paperweight as well though
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
}
@ -158,7 +158,6 @@ private fun Project.configureServerProject() {
archiveClassifier.set("") // ShadowJar is the main server artifact
dependsOn(generatePomFileForMavenJavaPublication)
transform(ModifiedLog4j2PluginsCacheFileTransformer::class.java)
//transform(Log4j2PluginsCacheFileTransformer::class.java)
mergeServiceFiles()
manifest {
attributes(
@ -182,7 +181,6 @@ private fun Project.configureServerProject() {
relocate("org.bukkit.craftbukkit", "org.bukkit.craftbukkit.v${toothpick.nmsPackage}") {
exclude("org.bukkit.craftbukkit.Main*")
}
relocate("net.minecraft.server", "net.minecraft.server.v${toothpick.nmsPackage}")
relocationSet.add(PatchesMetadata.Relocation("", "net.minecraft.server.v${toothpick.nmsPackage}", false))
// Make sure we relocate deps the same as Paper et al.
@ -202,9 +200,17 @@ private fun Project.configureServerProject() {
.elements("relocation").forEach { relocation ->
val pattern = relocation.search("pattern").first().textContent
val shadedPattern = relocation.search("shadedPattern").first().textContent
if (pattern != "org.bukkit.craftbukkit" && pattern != "net.minecraft.server") { // We handle these ourselves above
logger.debug("Imported relocation to server project shadowJar from ${pomFile.absolutePath}: $pattern to $shadedPattern")
relocate(pattern, shadedPattern)
val rawString = relocation.search("rawString").firstOrNull()?.textContent?.toBoolean() ?: false
if (pattern != "org.bukkit.craftbukkit") { // We handle cb ourselves
val excludes = if (rawString) listOf("net/minecraft/data/Main*") else emptyList()
relocate(
ToothpickRelocator(
pattern,
shadedPattern.replace("\${minecraft_version}", toothpick.nmsPackage),
rawString,
excludes = excludes
)
)
relocationSet.add(PatchesMetadata.Relocation(pattern, shadedPattern, true))
}
}

View File

@ -70,4 +70,5 @@ internal fun Project.initToothpickTasks() {
val upstreamCommit = createUpstreamCommitTask()
val repackageNMS = createRepackageNMSTask()
}

View File

@ -67,9 +67,12 @@ open class ToothpickExtension(objects: ObjectFactory) {
}
}
val paperWorkDir: File
val paperDecompDir: File
get() = paperDir.resolve("work/Minecraft/${minecraftVersion}")
val paperWorkDir: File
get() = paperDir.resolve("work")
fun getUpstreams(rootProjectDir: File): MutableList<Upstream>? {
val configDir = rootProjectDir.resolve("$rootProjectDir/upstreamConfig")
val upstreams = configDir.listFiles()

View File

@ -8,13 +8,15 @@ data class CmdResult(val exitCode: Int, val output: String?)
fun Project.cmd(
vararg args: String,
dir: File = rootProject.projectDir,
printOut: Boolean = false
printOut: Boolean = false,
environment: Map<String, String> = emptyMap()
): CmdResult {
val process = ProcessBuilder()
.command(*args)
.redirectErrorStream(true)
.directory(dir)
.start()
val process = ProcessBuilder().apply {
command(*args)
redirectErrorStream(true)
directory(dir)
environment().putAll(environment)
}.start()
val output = process.inputStream.bufferedReader().use { reader ->
reader.lines().asSequence()
.onEach {
@ -46,14 +48,16 @@ fun ensureSuccess(
fun Project.gitCmd(
vararg args: String,
dir: File = rootProject.projectDir,
printOut: Boolean = false
printOut: Boolean = false,
environment: Map<String, String> = emptyMap()
): CmdResult =
cmd("git", *args, dir = dir, printOut = printOut)
fun Project.bashCmd(
vararg args: String,
dir: File = rootProject.projectDir,
printOut: Boolean = false
printOut: Boolean = false,
environment: Map<String, String> = emptyMap()
): CmdResult =
cmd("bash", "-c", *args, dir = dir, printOut = printOut)

View File

@ -0,0 +1,58 @@
/*
* This file is part of Toothpick, licensed under the MIT License.
*
* Copyright (c) 2020-2021 Jason Penilla & Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package relocation
import com.github.jengelman.gradle.plugins.shadow.relocation.Relocator
import com.github.jengelman.gradle.plugins.shadow.relocation.SimpleRelocator
import java.lang.reflect.Method
import java.util.regex.Pattern
internal class ToothpickRelocator(
pattern: String,
shadedPattern: String,
rawString: Boolean = false,
includes: List<String> = emptyList(),
excludes: List<String> = emptyList(),
private val simpleRelocator: SimpleRelocator = SimpleRelocator(pattern, shadedPattern, includes, excludes, rawString)
) : Relocator by simpleRelocator {
override fun canRelocatePath(path: String): Boolean {
// Respect includes/excludes for rawString too
if (simpleRelocator.rawString) {
return isIncludedMethod(simpleRelocator, path) as Boolean
&& !(isExcludedMethod(simpleRelocator, path) as Boolean)
&& Pattern.compile(simpleRelocator.pathPattern).matcher(path).find()
}
return simpleRelocator.canRelocatePath(path)
}
companion object {
private val isExcludedMethod: Method = SimpleRelocator::class.java.getDeclaredMethod("isExcluded", String::class.java)
private val isIncludedMethod: Method = SimpleRelocator::class.java.getDeclaredMethod("isIncluded", String::class.java)
init {
isExcludedMethod.isAccessible = true
isIncludedMethod.isAccessible = true
}
}
}

View File

@ -11,6 +11,8 @@ import org.gradle.api.Task
import toothpick
import upstreams
import java.io.File
import java.nio.file.Files
import kotlin.streams.toList
internal fun Project.createImportMCDevTask(
receiver: Task.() -> Unit = {}
@ -20,42 +22,62 @@ internal fun Project.createImportMCDevTask(
val upstreamServer = toothpick.serverProject.baseDir
val importLog = arrayListOf("Extra mc-dev imports")
fun isDuplicateImport(target: File, className: String): Boolean {
if (!target.exists()) return false
val message = "Skipped import for $className, a class with that name already exists in the source tree. Is there an extra entry in mcdevimports.json?"
project.gradle.taskGraph.allTasks.last().doLast {
logger.warn(message)
}
logger.warn(message)
return true
}
fun importNMS(className: String) {
logger.lifecycle("Importing n.m.s.$className")
importLog.add("Imported n.m.s.$className")
val source = toothpick.paperWorkDir.resolve("spigot/net/minecraft/server/$className.java")
logger.lifecycle("Importing $className")
val classPath = "${className.replace(".", "/")}.java"
val source = toothpick.paperDecompDir.resolve("spigot/$classPath")
importLog.add("Importing $className")
if (!source.exists()) error("Missing NMS: $className")
val target = upstreamServer.resolve("src/main/java/net/minecraft/server/$className.java")
val target = upstreamServer.resolve("src/main/java/$classPath")
if (isDuplicateImport(target, className)) return
target.parentFile.mkdirs()
source.copyTo(target)
}
fun importLibrary(import: LibraryImport) {
val (group, lib, prefix, file) = import
logger.lifecycle("Importing $group.$lib $prefix/$file")
importLog.add("Imported $group.$lib $prefix/$file")
val source = toothpick.paperWorkDir.resolve("libraries/$group/$lib/$prefix/$file.java")
val className = "${prefix.replace("/", ".")}.$file"
importLog.add("Imported $className from $group.$lib")
logger.lifecycle("Importing $className from $group.$lib")
val source = toothpick.paperDecompDir.resolve("libraries/$group/$lib/$prefix/$file.java")
if (!source.exists()) error("Missing Base: $lib $prefix/$file")
val targetDir = upstreamServer.resolve("src/main/java/$prefix")
val target = targetDir.resolve("$file.java")
if (isDuplicateImport(target, className)) return
targetDir.mkdirs()
source.copyTo(target)
}
fun findNeededImports(patches: List<File>): Set<String> = patches.asSequence()
.flatMap { it.readLines().asSequence() }
.filter { line ->
line.startsWith("+++ b/src/main/java/net/minecraft/")
|| line.startsWith("+++ b/src/main/java/com/mojang/math/")
}
.distinct()
.map { it.substringAfter("+++ b/src/main/java/") }
.filter { !upstreamServer.resolve("src/main/java/$it").exists() }
.filter {
val sourceFile = toothpick.paperDecompDir.resolve("spigot/$it")
val exists = sourceFile.exists()
if (!sourceFile.exists()) logger.lifecycle("$it is either missing, or is a new file added through a patch")
exists
}
.map { it.replace("/", ".").substringBefore(".java") }
.toSet()
fun getAndApplyNMS(patchesDir: File) {
(patchesDir.listFiles() ?: return).asSequence()
.flatMap { it.readLines().asSequence() }
.filter { it.startsWith("+++ b/src/main/java/net/minecraft/server/") }
.distinct()
.map { it.substringAfter("/server/").substringBefore(".java") }
.filter { !upstreamServer.resolve("src/main/java/net/minecraft/server/$it.java").exists() }
.map { toothpick.paperWorkDir.resolve("spigot/net/minecraft/server/$it.java") }
.filter {
val exists = it.exists()
if (!it.exists()) logger.lifecycle("NMS ${it.nameWithoutExtension} is either missing, or is a new file added through a patch")
exists
}
.map { it.nameWithoutExtension }
.forEach(::importNMS)
findNeededImports(patchesDir.listFiles().toList()).toList().forEach(::importNMS)
}
doLast {

View File

@ -0,0 +1,108 @@
/*
* This file is part of Toothpick, licensed under the MIT License.
*
* Copyright (c) 2020-2021 Jason Penilla & Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package task
import org.gradle.api.tasks.TaskAction
import java.io.File
import org.gradle.api.Project
import org.gradle.api.Task
import taskGroup
import upstreams
import gitCmd
import toothpick
import java.nio.file.Paths
import java.util.concurrent.ConcurrentHashMap
import ensureSuccess
import java.net.URL
@Suppress("UNUSED_VARIABLE")
internal fun Project.createRepackageNMSTask(
receiver: Task.() -> Unit = {}
): Task = tasks.create("repackageNMS") {
receiver(this)
group = taskGroup
class Mapping(fullyQualifiedClassName: String) {
val className = fullyQualifiedClassName.substringAfterLast(".")
val oldFQName = "net.minecraft.server.$className"
val oldJavaFileName = "net/minecraft/server/$className.java"
val newFQName = fullyQualifiedClassName
val newJavaFileName = "${fullyQualifiedClassName.replace(".", "/")}.java"
}
class Remapper(private val mappings: Set<Mapping>) {
fun remapFile(file: File): String =
file.readLines().joinToString("\n") { remapLine(it) } + "\n"
private fun remapLine(line: String): String {
if (
line.startsWith("diff --git ")
|| line.startsWith("+++ ")
|| line.startsWith("--- ")
) {
var text = line
mappings.forEach { text = text.replace(it.oldJavaFileName, it.newJavaFileName) }
return text
}
if (line.startsWith("+")) {
var text = line
mappings.forEach { text = text.replace(it.oldFQName, it.newFQName) }
return text
}
return line
}
}
doLast {
logger.lifecycle("Downloading class mappings from spigot...")
val mappingsFileText = URL("https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/raw/mappings/bukkit-1.16.5-cl.csrg?at=80d35549ec67b87a0cdf0d897abbe826ba34ac27").readText()
logger.lifecycle("Done downloading class mappings.")
logger.lifecycle(">>> Preparing patches for NMS repackage")
val mappings = mappingsFileText
.split("\n")
.asSequence()
.filter { !it.startsWith("#") && !it.contains("$") && it.trim().isNotEmpty() }
.map { it.split(" ")[1].replace("/", ".") }
.map { Mapping(it) }
.filter { it.newFQName != it.oldFQName }
.toSet()
val remapper = Remapper(mappings)
toothpick.subprojects.values
.map { it.patchesDir }
.forEach { patchesDir ->
val repackagedPatchesDir =
patchesDir.parentFile.resolve("${patchesDir.name}_repackaged-${System.currentTimeMillis()}")
repackagedPatchesDir.mkdir()
val patchFiles = patchesDir.listFiles()?.toList() ?: error("Could not list patch files")
patchFiles.parallelStream().forEach { patch ->
logger.lifecycle("Processing ${patchesDir.name}/${patch.name}...")
val newPatch = repackagedPatchesDir.resolve(patch.name)
newPatch.writeText(remapper.remapFile(patch))
}
}
logger.lifecycle(">>> Done preparing patches")
}
}

View File

@ -1,107 +1,39 @@
/*
* 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
* This file is part of Toothpick, licensed under the MIT License.
*
* http://www.apache.org/licenses/LICENSE-2.0
* Copyright (c) 2020-2021 Jason Penilla & Contributors
*
* 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.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package xyz.jpenilla.toothpick.transformer
package 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.Log4j2PluginsCacheFileTransformer
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
internal class ModifiedLog4j2PluginsCacheFileTransformer : Transformer by Log4j2PluginsCacheFileTransformer() {
/**
* For some reason we have a file with name matching simply 'Log4j2Plugins.dat' and not PLUGIN_CACHE_FILE.
* That file also needs to be merged.
*/
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
}
}
}
}
}
}
}

View File

@ -19,11 +19,80 @@ 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/LootTableInfo.java b/src/main/java/net/minecraft/server/LootTableInfo.java
index addeb268d4d487e18ddaadebf96f078fd079246f..cbd034127de8a30b82b27c367bdd9270b43b98b0 100644
--- a/src/main/java/net/minecraft/server/LootTableInfo.java
+++ b/src/main/java/net/minecraft/server/LootTableInfo.java
@@ -53,7 +53,7 @@ public class LootTableInfo {
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
index 375409f4b72edc7990da90460b30486fb2980fb6..ab692de8a5b1411e37251fb545e6f579a9929f91 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
@@ -54,7 +54,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
public int conversionTicks = 0;
public boolean cannotBeHunted = false;
protected static final ImmutableList<? extends SensorType<? extends Sensor<? super EntityHoglin>>> bo = ImmutableList.of(SensorType.c, SensorType.d, SensorType.n, SensorType.m);
- protected static final ImmutableList<? extends MemoryModuleType<?>> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED});
+ protected static final ImmutableList<MemoryModuleType<?>> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED}); // Airplane - decompile error
public EntityHoglin(EntityTypes<? extends EntityHoglin> entitytypes, World world) {
super(entitytypes, world);
@@ -118,13 +118,13 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
@Override
public BehaviorController<EntityHoglin> getBehaviorController() {
- return super.getBehaviorController();
+ return (BehaviorController<EntityHoglin>) super.getBehaviorController(); // Airplane - decompile error
}
@Override
protected void mobTick() {
this.world.getMethodProfiler().enter("hoglinBrain");
- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
+ this.getBehaviorController().a((WorldServer) this.world, (EntityHoglin) this); // Airplane - decompile error
this.world.getMethodProfiler().exit();
HoglinAI.a(this);
if (this.isConverting()) {
@@ -300,7 +300,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
@Override
protected SoundEffect getSoundAmbient() {
- return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse((Object) null);
+ return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse(null); // Airplane - decompile error
}
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
index f2f65dc0612cc232009ea7ff12f5c1ba4e6b15ea..d100b39c420e2326e869aa4059fc800d4c2fc0e4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
@@ -188,7 +188,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
@Override
public BehaviorController<EntityPiglin> getBehaviorController() {
- return super.getBehaviorController();
+ return (BehaviorController<EntityPiglin>) super.getBehaviorController(); // Airplane - compile error
}
@Override
@@ -247,7 +247,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
@Override
protected void mobTick() {
this.world.getMethodProfiler().enter("piglinBrain");
- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
+ this.getBehaviorController().a((WorldServer) this.world, (EntityPiglin) this); // Airplane - compile error
this.world.getMethodProfiler().exit();
PiglinAI.b(this);
super.mobTick();
@@ -386,7 +386,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
@Override
protected SoundEffect getSoundAmbient() {
- return this.world.isClientSide ? null : (SoundEffect) PiglinAI.d(this).orElse((Object) null);
+ return this.world.isClientSide ? null : (SoundEffect) PiglinAI.d(this).orElse(null); // Airplane - compile error
}
@Override
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
index 95d0c9f22d79194ca83ca6f6a8e6d91180a3c8da..5c712af849abf1e5f58a7760b19c543474559f77 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
@@ -62,7 +62,7 @@ public class LootTableInfo {
@Nullable
public <T> T getContextParameter(LootContextParameter<T> lootcontextparameter) {
@ -32,7 +101,7 @@ index addeb268d4d487e18ddaadebf96f078fd079246f..cbd034127de8a30b82b27c367bdd9270
}
public boolean a(LootTable loottable) {
@@ -207,7 +207,7 @@ public class LootTableInfo {
@@ -216,7 +216,7 @@ public class LootTableInfo {
}
public <T> T a(LootContextParameter<T> lootcontextparameter) {
@ -41,7 +110,7 @@ index addeb268d4d487e18ddaadebf96f078fd079246f..cbd034127de8a30b82b27c367bdd9270
if (t0 == null) {
throw new IllegalArgumentException("No parameter " + lootcontextparameter);
@@ -218,7 +218,7 @@ public class LootTableInfo {
@@ -227,7 +227,7 @@ public class LootTableInfo {
@Nullable
public <T> T b(LootContextParameter<T> lootcontextparameter) {

View File

@ -0,0 +1,112 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Wed, 3 Feb 2021 21:36:16 -0600
Subject: [PATCH] Airplane Branding Changes
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 dad9981b1cd1ca8b27a45972188fd2b92f5146e7..a3a3b17f3b30b55bb50905353e77723091bb5c1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,8 +27,8 @@
<dependencies>
<dependency>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-api</artifactId>
+ <groupId>gg.airplane</groupId>
+ <artifactId>airplane-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index 52c0ab1ce46e1f3233ef746d9bc699356fa9fae4..b480bd3044370b8eb733166f0c4b737344475993 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -593,7 +593,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
- Metrics metrics = new Metrics("Tuinity", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page
+ Metrics metrics = new Metrics("Airplane", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page // Airplane
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
String minecraftVersion = Bukkit.getVersion();
@@ -603,7 +603,7 @@ public class Metrics {
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() || PaperConfig.isProxyOnlineMode() ? "online" : "offline"));
- metrics.addCustomChart(new Metrics.SimplePie("tuinity_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page
+ metrics.addCustomChart(new Metrics.SimplePie("airplane_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page // Airplane
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
index 7063f1da3654b382e26b0093ad5d0ff04a2b38c2..b9c5479e5561f8fe68ea8f94fbf4e64de8a53bf9 100644
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -28,8 +28,8 @@ public class PaperVersionFetcher implements VersionFetcher {
@Nonnull
@Override
public Component getVersionMessage(@Nonnull String serverVersion) {
- String[] parts = serverVersion.substring("git-Tuinity-".length()).split("[-\\s]"); // Tuinity
- final Component updateMessage = getUpdateStatusMessage("Spottedleaf/Tuinity", GITHUB_BRANCH_NAME, parts[0]); // Tuinity
+ String[] parts = serverVersion.substring("git-Airplane-".length()).split("[-\\s]"); // Tuinity
+ final Component updateMessage = getUpdateStatusMessage("TECHNOVE/Airplane", GITHUB_BRANCH_NAME, parts[0]); // Tuinity
final Component history = getHistory();
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e757cb5c2d50cb3a4dbe50d4726db09ab845fcbb..7cbbc1b1161f26f22a7f7832395af0d4a781cb1a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
- return "Tuinity"; // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
+ return "Airplane"; // Airplane // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
}
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fd3333fef4112e6469ccd316ba2c82926c04e5db..b5ffc5f5cf04892d30092625533643c99047c16b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
- private final String serverName = "Tuinity"; // Paper // Tuinity
+ private final String serverName = "Airplane"; // Paper // Tuinity // Airplane
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 001b1e5197eaa51bfff9031aa6c69876c9a47960..1788d79ea489e446d3d9f541693d4ba3dfc26015 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {
public static String getBukkitVersion() {
String result = "Unknown-Version";
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.tuinity/tuinity-api/pom.properties"); // Tuinity
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/gg.airplane/airplane-api/pom.properties"); // Tuinity // Airplane
Properties properties = new Properties();
if (stream != null) {

View File

@ -85,10 +85,10 @@ index 0000000000000000000000000000000000000000..1fa9b40e2f89272fa8bc9d927a9a852b
+}
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
index 0000000000000000000000000000000000000000..fbb9544027a48941bd0938d8f607e8c7ff9443a1
--- /dev/null
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
@@ -0,0 +1,46 @@
@@ -0,0 +1,47 @@
+package gg.airplane;
+
+import gg.airplane.manual.ManualParser;
@ -113,8 +113,9 @@ index 0000000000000000000000000000000000000000..4feb9686f45ce4ae9f474447496b8e0f
+
+ manual.get("info.version", "1.0");
+ manual.setComment("info",
+ " Airplane Configuration",
+ " Please see https://airplane.gg/config for help.");
+ "Airplane Configuration",
+ "Read https://blog.airplane.gg/ to find out more about Airplane",
+ "Join our Discord to receive support & optimization help: https://discord.gg/3gtc45q");
+
+ for (Method method : AirplaneConfig.class.getDeclaredMethods()) {
+ if (Modifier.isStatic(method.getModifiers()) && Modifier.isPrivate(method.getModifiers())) {
@ -367,11 +368,11 @@ index 0000000000000000000000000000000000000000..ace29adb0f140d99a8d85ac824654bed
+ }
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index e3721b53db68171665ba05201155d088ae3cb89f..b8a45c80b6691214e513286262f31b7b5b1dd5eb 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -185,6 +185,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index d902efdb8f2d42ea4c3933f7fa76ebe135ee09db..24a46ad36613faa5f5a1a12b70f7af886e1608ae 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -215,6 +215,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

View File

@ -19,11 +19,19 @@ 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/BehaviorBetterJob.java b/src/main/java/net/minecraft/server/BehaviorBetterJob.java
index 19f8cf4384ff7a1515ad33a5f573ea0061bab93d..e6507a9bef705e1496497ad6b58a546348a0779e 100644
--- a/src/main/java/net/minecraft/server/BehaviorBetterJob.java
+++ b/src/main/java/net/minecraft/server/BehaviorBetterJob.java
@@ -14,11 +14,31 @@ public class BehaviorBetterJob extends Behavior<EntityVillager> {
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java
index 72f1031e95b375823790f8cac4c102ba1205c9e8..e4821c1a7ceac582b019102230dbe5221add9050 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java
@@ -3,6 +3,7 @@ package net.minecraft.world.entity.ai.behavior;
import com.google.common.collect.ImmutableMap;
import net.minecraft.core.GlobalPos;
import net.minecraft.server.level.WorldServer;
+import net.minecraft.world.entity.EntityLiving;
import net.minecraft.world.entity.ai.memory.MemoryModuleType;
import net.minecraft.world.entity.ai.memory.MemoryStatus;
import net.minecraft.world.entity.ai.village.poi.VillagePlaceType;
@@ -21,11 +22,31 @@ public class BehaviorBetterJob extends Behavior<EntityVillager> {
protected void a(WorldServer worldserver, EntityVillager entityvillager, long i) {
GlobalPos globalpos = (GlobalPos) entityvillager.getBehaviorController().getMemory(MemoryModuleType.JOB_SITE).get();

View File

@ -26,11 +26,47 @@ 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/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 90d41b9e286064f11ce55badfb76574778d933a6..523db5ec954bc420a478bbaaf0d10d5a63024ccd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3071,7 +3071,7 @@ public abstract class EntityLiving extends Entity {
diff --git a/src/main/java/net/minecraft/util/MathHelper.java b/src/main/java/net/minecraft/util/MathHelper.java
index cc566784c7dd21cc2c44e0f351347f657e57ddcf..e9e7fcf2b63febe2a7d055826fabb86bc13a5cf3 100644
--- a/src/main/java/net/minecraft/util/MathHelper.java
+++ b/src/main/java/net/minecraft/util/MathHelper.java
@@ -240,6 +240,7 @@ public class MathHelper {
return f - (float) d(f);
}
+ public static double getDecimals(double num) { return h(num); } // Airplane
public static double h(double d0) {
return d0 - (double) d(d0);
}
@@ -418,6 +419,7 @@ public class MathHelper {
return f1 + f * (f2 - f1);
}
+ public static double linearInterpolation(double value1, double value2, double amount) { return d(value1, value2, amount); } // Airplane - OBFHELPER
public static double d(double d0, double d1, double d2) {
return d1 + d0 * (d2 - d1);
}
@@ -434,6 +436,7 @@ public class MathHelper {
return d0 * d0 * d0 * (d0 * (d0 * 6.0D - 15.0D) + 10.0D);
}
+ public static int sign(double num) { return k(num); } // Airplane - OBFHELPER
public static int k(double d0) {
return d0 == 0.0D ? 0 : (d0 > 0.0D ? 1 : -1);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 561905be42428855a07a2e63aca80d5dd63b22bf..d991e3be65dc94597bd56ad9e034972e0e99a840 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -111,6 +111,7 @@ import net.minecraft.world.phys.AxisAlignedBB;
import net.minecraft.world.phys.MovingObjectPosition;
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.phys.shapes.VoxelShapeCollision;
import net.minecraft.world.scores.ScoreboardTeam;
import org.apache.logging.log4j.Logger;
@@ -3101,7 +3102,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());
@ -39,11 +75,23 @@ index 90d41b9e286064f11ce55badfb76574778d933a6..523db5ec954bc420a478bbaaf0d10d5a
}
@Override
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
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 {
diff --git a/src/main/java/net/minecraft/world/level/IBlockAccess.java b/src/main/java/net/minecraft/world/level/IBlockAccess.java
index e612e1d30f76e217b1aa23488ab025adce048f57..c9198d242b9053fad6fa5b53c1894679002d50a7 100644
--- a/src/main/java/net/minecraft/world/level/IBlockAccess.java
+++ b/src/main/java/net/minecraft/world/level/IBlockAccess.java
@@ -14,9 +14,11 @@ import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.phys.AxisAlignedBB;
+import net.minecraft.world.phys.MovingObjectPosition;
import net.minecraft.world.phys.MovingObjectPositionBlock;
import net.minecraft.world.phys.Vec3D;
import net.minecraft.world.phys.shapes.VoxelShape;
+import net.minecraft.world.phys.shapes.VoxelShapeCollision;
public interface IBlockAccess {
@@ -56,6 +58,15 @@ public interface IBlockAccess {
return BlockPosition.a(axisalignedbb).map(this::getType);
}
@ -59,44 +107,25 @@ index 5ccf6b483fe15d4ad12ce2d3d11e9440ee9e8ab7..ec82d91804eeed49a6ef67a92fd24a06
// CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
default MovingObjectPositionBlock rayTraceBlock(RayTrace raytrace1, BlockPosition blockposition) {
// Paper start - Prevent raytrace from loading chunks
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
index 2e7721a650c5a351b3584665bd236f92ef577761..b3c2b461b2a654a9e37a57f2f62b3ba8b5bb1634 100644
--- a/src/main/java/net/minecraft/server/MathHelper.java
+++ b/src/main/java/net/minecraft/server/MathHelper.java
@@ -238,6 +238,7 @@ public class MathHelper {
return f - (float) d(f);
}
+ public static double getDecimals(double num) { return h(num); } // Airplane
public static double h(double d0) {
return d0 - (double) d(d0);
}
@@ -416,6 +417,7 @@ public class MathHelper {
return f1 + f * (f2 - f1);
}
+ public static double linearInterpolation(double value1, double value2, double amount) { return d(value1, value2, amount); } // Airplane - OBFHELPER
public static double d(double d0, double d1, double d2) {
return d1 + d0 * (d2 - d1);
}
@@ -432,6 +434,7 @@ public class MathHelper {
return d0 * d0 * d0 * (d0 * (d0 * 6.0D - 15.0D) + 10.0D);
}
+ public static int sign(double num) { return k(num); } // Airplane - OBFHELPER
public static int k(double d0) {
return d0 == 0.0D ? 0 : (d0 > 0.0D ? 1 : -1);
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index abd415f02d8b4c28602b6c4aefc0914b5a83165b..9d6ddfec93f49f80fdc88248fc5aaf5ad6ee48da 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -363,6 +363,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index c8a5d4972431ce9615312280f36181a2b9645df7..bbc842a173b12a96b1b63af347d2196ac1cb5f73 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -69,6 +69,8 @@ import net.minecraft.world.level.saveddata.maps.WorldMap;
import net.minecraft.world.level.storage.WorldData;
import net.minecraft.world.level.storage.WorldDataMutable;
import net.minecraft.world.phys.AxisAlignedBB;
+import net.minecraft.world.phys.MovingObjectPosition;
+import net.minecraft.world.phys.Vec3D;
import net.minecraft.world.phys.shapes.OperatorBoolean;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
@@ -378,6 +380,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return null;
}
+ // Airplane start - broken down method of raytracing for EntityLiving#hasLineOfSight, replaces IBlockAccess#rayTrace(RayTrace)
+ protected MovingObjectPosition.EnumMovingObjectType rayTraceDirect(Vec3D vec3d, Vec3D vec3d1, VoxelShapeCollision voxelshapecoll) {
+ public MovingObjectPosition.EnumMovingObjectType rayTraceDirect(Vec3D vec3d, Vec3D vec3d1, VoxelShapeCollision voxelshapecoll) {
+ // most of this code comes from IBlockAccess#a(RayTrace, BiFunction, Function), but removes the needless functions
+ if (vec3d.equals(vec3d1)) {
+ return MovingObjectPosition.EnumMovingObjectType.MISS;

View File

@ -23,11 +23,11 @@ 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/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java
index ecd63281912ae0ed93c5eb5ccb4249833cb23ab1..97825ec914709ca037159c46ecee218a6013ff58 100644
--- a/src/main/java/net/minecraft/server/ShapelessRecipes.java
+++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java
@@ -18,8 +18,16 @@ public class ShapelessRecipes implements RecipeCrafting {
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java
index e112d149fc3a7af7f0c9a5280c94c9b03b2aba2d..d2afc367fb393c6206f9cd599d4603294d457608 100644
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java
@@ -26,8 +26,16 @@ public class ShapelessRecipes implements RecipeCrafting {
private final String group;
private final ItemStack result;
private final NonNullList<RecipeItemStack> ingredients;
@ -44,7 +44,7 @@ index ecd63281912ae0ed93c5eb5ccb4249833cb23ab1..97825ec914709ca037159c46ecee218a
this.key = minecraftkey;
this.group = s;
this.result = itemstack;
@@ -61,6 +69,28 @@ public class ShapelessRecipes implements RecipeCrafting {
@@ -69,6 +77,28 @@ public class ShapelessRecipes implements RecipeCrafting {
}
public boolean a(InventoryCrafting inventorycrafting, World world) {
@ -74,7 +74,7 @@ index ecd63281912ae0ed93c5eb5ccb4249833cb23ab1..97825ec914709ca037159c46ecee218a
int i = 0;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
index 4aba511fe8078164bf1467b39645dd9bf6a931e7..56b781e438f0cf1c12dd55eb37356601e47de47f 100644
index de9c5ed6b03a290fe77eec719f0079fd7bd9b7f5..8c02f6fdffb59153712a3be778f9c454fd87b73b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
@@ -44,6 +44,6 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe

View File

@ -19,11 +19,11 @@ 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/LootTableInfo.java b/src/main/java/net/minecraft/server/LootTableInfo.java
index cbd034127de8a30b82b27c367bdd9270b43b98b0..25b6e240cf135da0643250b3f498a077dae070da 100644
--- a/src/main/java/net/minecraft/server/LootTableInfo.java
+++ b/src/main/java/net/minecraft/server/LootTableInfo.java
@@ -34,8 +34,8 @@ public class LootTableInfo {
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
index 5c712af849abf1e5f58a7760b19c543474559f77..20cc04be75ab202d4c4ee9a07e9876ceff8422ca 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
@@ -43,8 +43,8 @@ public class LootTableInfo {
this.world = worldserver;
this.d = function;
this.f = function1;

View File

@ -22,11 +22,11 @@ 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/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 877ba68edec7b8b444ea7cd849fdcb337cfbc60d..63dd6aba40506014b15efecfb8562c4f455ac04e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1137,7 +1137,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 46f960b9276dced41deb8f741454b6cce5a81529..277132da0b3672a9097b16f3b8534975dc795e3e 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1210,7 +1210,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.enter("thunder");
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change

View File

@ -19,11 +19,20 @@ 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/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index d85a19905efab7189e461a61becb6ca2b8c50803..4b3d5731a18177c74f02eef91820720104145d1c 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -85,6 +85,37 @@ public abstract class EntityProjectile extends IProjectile {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java
index e55061b6c04b4bde92404a6ef58ba9a52cd99c1d..24d205dd1f31ece82d5cf516b8642eb0172e1a97 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java
@@ -4,6 +4,8 @@ import net.minecraft.core.BlockPosition;
import net.minecraft.core.particles.Particles;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.util.MathHelper;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityLiving;
import net.minecraft.world.entity.EntityTypes;
@@ -102,6 +104,37 @@ public abstract class EntityProjectile extends IProjectile {
this.setPosition(d0, d1, d2);
}

View File

@ -33,11 +33,54 @@ 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/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8e59a794f6190930cb7bb81a2fe1a1d374dacce7..045b4af6721817b3dbfb05b9aec0bf382de9fcf5 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -53,6 +53,18 @@ public class Chunk implements IChunkAccess {
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
index cb83f1152c52a99d25e4e80cc8bf18c6793e8b50..87c87b9767003652814c3726eece64470dbb69a8 100644
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
@@ -1000,6 +1000,7 @@ public class ChunkProviderServer extends IChunkProvider {
}
// Paper end - optimize isOutisdeRange
this.world.getMethodProfiler().enter("pollingChunks");
+ this.world.resetIceAndSnowTick(); // Airplane - reset ice & snow tick random
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 277132da0b3672a9097b16f3b8534975dc795e3e..b33f37309d4dd22c033ad84effa4ff9d6e20a790 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1200,6 +1200,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private final BiomeBase[] biomeBaseCache = new BiomeBase[1];
// Tuinity end - optimise chunk ice snow ticking
+ private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // Airplane
+
public void a(Chunk chunk, int i) { final int randomTickSpeed = i; // Paper
ChunkCoordIntPair chunkcoordintpair = chunk.getPos();
boolean flag = this.isRaining();
@@ -1210,7 +1212,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.enter("thunder");
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
- if (!this.paperConfig.disableThunder && flag && this.random.nextInt(100000) == 0 && this.W()) { // Paper - Disable thunder // Airplane - check this.W last
+ if (!this.paperConfig.disableThunder && flag && chunk.shouldDoLightning(this.random) && this.W()) { // Paper - Disable thunder // Airplane - check this.W last // Airplane - replace random with shouldDoLighting
blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
@@ -1234,7 +1236,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
gameprofilerfiller.exitEnter("iceandsnow");
- if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking
+ if (!this.paperConfig.disableIceAndSnow && (this.currentIceAndSnowTick++ & 15) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking // Airplane - optimize further random ticking
// Paper start - optimise chunk ticking
// Tuinity start - optimise chunk ice snow ticking
BiomeBase[] biomeCache = this.biomeBaseCache;
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
index 259d4ac89e84fd334ff65ea8a606e1fc50cc882b..226f9e5a3d867b5365f3ea44c1459ed7265c1b41 100644
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
@@ -99,6 +99,18 @@ public class Chunk implements IChunkAccess {
private final ChunkCoordIntPair loc; public final long coordinateKey; public final int locX; public final int locZ; // Paper - cache coordinate key
private volatile boolean x;
@ -56,7 +99,7 @@ index 8e59a794f6190930cb7bb81a2fe1a1d374dacce7..045b4af6721817b3dbfb05b9aec0bf38
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage) {
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
}
@@ -287,6 +299,7 @@ public class Chunk implements IChunkAccess {
@@ -333,6 +345,7 @@ public class Chunk implements IChunkAccess {
// CraftBukkit start
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
this.entitySlicesManager = new com.tuinity.tuinity.world.ChunkEntitySlices(this.world, this.loc.x, this.loc.z, 0, 15); // TODO update for 1.17 // Tuinity
@ -64,46 +107,3 @@ index 8e59a794f6190930cb7bb81a2fe1a1d374dacce7..045b4af6721817b3dbfb05b9aec0bf38
}
public org.bukkit.Chunk bukkitChunk;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index b55f7dece329dbb3ff27d57a39c32c69e5baea74..5897d462d350dfbd1464feb92ecf77725651c694 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -975,6 +975,7 @@ public class ChunkProviderServer extends IChunkProvider {
}
// Paper end - optimize isOutisdeRange
this.world.getMethodProfiler().enter("pollingChunks");
+ this.world.resetIceAndSnowTick(); // Airplane - reset ice & snow tick random
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 63dd6aba40506014b15efecfb8562c4f455ac04e..7660d098046100a4ab168149604ec196a4eea03d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1127,6 +1127,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private final BiomeBase[] biomeBaseCache = new BiomeBase[1];
// Tuinity end - optimise chunk ice snow ticking
+ private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // Airplane
+
public void a(Chunk chunk, int i) { final int randomTickSpeed = i; // Paper
ChunkCoordIntPair chunkcoordintpair = chunk.getPos();
boolean flag = this.isRaining();
@@ -1137,7 +1139,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.enter("thunder");
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
- if (!this.paperConfig.disableThunder && flag && this.random.nextInt(100000) == 0 && this.W()) { // Paper - Disable thunder // Airplane - check this.W last
+ if (!this.paperConfig.disableThunder && flag && chunk.shouldDoLightning(this.random) && this.W()) { // Paper - Disable thunder // Airplane - check this.W last // Airplane - replace random with shouldDoLighting
blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
@@ -1167,7 +1169,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
gameprofilerfiller.exitEnter("iceandsnow");
- if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking
+ if (!this.paperConfig.disableIceAndSnow && (this.currentIceAndSnowTick++ & 15) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking // Airplane - optimize further random ticking
// Paper start - optimise chunk ticking
// Tuinity start - optimise chunk ice snow ticking
BiomeBase[] biomeCache = this.biomeBaseCache;

View File

@ -19,11 +19,11 @@ 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/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 523db5ec954bc420a478bbaaf0d10d5a63024ccd..c5762aebcdd383ab710d4891308a7b1e815c44fd 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 {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index d991e3be65dc94597bd56ad9e034972e0e99a840..1a7866bed9cb7f0431454d3af4733de05c0cba78 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -910,11 +910,13 @@ public abstract class EntityLiving extends Entity {
}
if (entity != null) {

View File

@ -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/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
index 4feb9686f45ce4ae9f474447496b8e0f6fcb7e31..c39c9929a251b41ab60e1509b4e6c90d0825dc0c 100644
index fbb9544027a48941bd0938d8f607e8c7ff9443a1..e0bed57aa5547a214ad779dbd0f648f3663147f9 100644
--- a/src/main/java/gg/airplane/AirplaneConfig.java
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
@@ -43,4 +43,29 @@ public class AirplaneConfig {
@@ -44,4 +44,29 @@ public class AirplaneConfig {
}
}
@ -60,11 +60,11 @@ index 4feb9686f45ce4ae9f474447496b8e0f6fcb7e31..c39c9929a251b41ab60e1509b4e6c90d
+ }
+
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
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
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index feab0ae1930b5271fe0d06a40c180317dcbc9d1d..c6b4af810fe3bda7797ab94316b2357178c9cd49 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -289,6 +289,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
public void inactiveTick() { }
// Spigot end
public boolean shouldBeRemoved; // Paper
@ -74,34 +74,11 @@ index 94af972e115491d0f4394dd290ec2d9d426b8d32..426bebc5cd67ffcc72ee56d437cc13f6
public float getBukkitYaw() {
return this.yaw;
diff --git a/src/main/java/net/minecraft/server/EntityHoglin.java b/src/main/java/net/minecraft/server/EntityHoglin.java
index 4a3469aca9f9e47d2ea3f3bae6ce77f5f11d6b50..5af5b50889961b10e812598dbea657c4e2aeceeb 100644
--- a/src/main/java/net/minecraft/server/EntityHoglin.java
+++ b/src/main/java/net/minecraft/server/EntityHoglin.java
@@ -102,13 +102,18 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
return (BehaviorController<EntityHoglin>) super.getBehaviorController(); // Purpur - decompile error
}
+ private int behaviorTick; // Airplane
@Override
protected void mobTick() {
+ // Airplane - dynamic tick
+ if (!gg.airplane.AirplaneConfig.dynamicHoglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) {
this.world.getMethodProfiler().enter("hoglinBrain");
if (getRider() == null) // Purpur - only use brain if no rider
this.getBehaviorController().a((WorldServer) this.world, this); // Purpur - decompile error
this.world.getMethodProfiler().exit();
HoglinAI.a(this);
+ }
+ // Airplane end
if (this.isConverting()) {
++this.conversionTicks;
if (this.conversionTicks > 300) {
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index d6a086f59d9df8ef7f727e6a83fa51a14995123e..cb094f00b6c7869632b9dacfc2c8c8e8299fddde 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -133,10 +133,10 @@ public abstract class EntityInsentient extends EntityLiving {
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index aae13c2e6c2a30b69c33417932c6a4d0aefeb7f5..f4440a5c4aedb1d7d303517f86a07c856dd1309b 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -201,10 +201,10 @@ public abstract class EntityInsentient extends EntityLiving {
@Override
public void inactiveTick() {
super.inactiveTick();
@ -114,7 +91,7 @@ index d6a086f59d9df8ef7f727e6a83fa51a14995123e..cb094f00b6c7869632b9dacfc2c8c8e8
this.targetSelector.doTick();
}
}
@@ -797,9 +797,11 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -829,9 +829,11 @@ public abstract class EntityInsentient extends EntityLiving {
this.bo.a();
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("targetSelector");
@ -126,60 +103,11 @@ index d6a086f59d9df8ef7f727e6a83fa51a14995123e..cb094f00b6c7869632b9dacfc2c8c8e8
this.goalSelector.doTick();
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("navigation");
diff --git a/src/main/java/net/minecraft/server/EntityPiglin.java b/src/main/java/net/minecraft/server/EntityPiglin.java
index 4849829df1041568a9fcac6d16501fc0606d95da..2ac74751ac8cea0b829b3d0ed03f052162a78781 100644
--- a/src/main/java/net/minecraft/server/EntityPiglin.java
+++ b/src/main/java/net/minecraft/server/EntityPiglin.java
@@ -216,13 +216,18 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
return !this.cannotHunt;
}
+ private int behaviorTick; // Airplane
@Override
protected void mobTick() {
+ // Airplane - dynamic tick
+ if (!gg.airplane.AirplaneConfig.dynamicPiglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) {
this.world.getMethodProfiler().enter("piglinBrain");
if (getRider() == null) // Purpur - only use brain if no rider
this.getBehaviorController().a((WorldServer) this.world, this); // Purpur - decompile error
this.world.getMethodProfiler().exit();
PiglinAI.b(this);
+ }
+ // Airplane end
super.mobTick();
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 850dae5f20649854f013c0e530a3325455b5db4a..9b30273d59eb7f0d40cd54eb9e1d2ebe24b48fca 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -210,6 +210,8 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
}
// Purpur end
+ private int behaviorTick = 0;
+
@Override
protected void mobTick() { mobTick(false); }
protected void mobTick(boolean inactive) {
@@ -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
- if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
+ if (!inactive) {
+ if (!gg.airplane.AirplaneConfig.dynamicVillagerBehavior || behaviorTick++ % this.activatedPriority == 0) {
+ this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
+ }
+ }
else if (shouldRestock()) doRestock(); // Purpur
this.world.getMethodProfiler().exit();
if (this.bF) {
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
index 9cad895c7d008487ce885cbcc2c3966645df4c19..2ce5e07f4dcd0c76073840c35be66b7c65c6e7e8 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
@@ -43,9 +43,14 @@ public class PathfinderGoalSelector {
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
index 637928664f8c7b1c694a234e507c20724294e450..f303c5d6b2e55fc9fd8b49ec21121805e7351034 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
@@ -44,9 +44,14 @@ public class PathfinderGoalSelector {
}
// Paper start
@ -197,21 +125,88 @@ index 9cad895c7d008487ce885cbcc2c3966645df4c19..2ce5e07f4dcd0c76073840c35be66b7c
}
public boolean hasTasks() {
for (PathfinderGoalWrapped task : getTasks()) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
index ab692de8a5b1411e37251fb545e6f579a9929f91..9aa4850e021076fde306eea7eec104c31086c57f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
@@ -121,12 +121,17 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
return (BehaviorController<EntityHoglin>) super.getBehaviorController(); // Airplane - decompile error
}
+ private int behaviorTick; // Airplane
@Override
protected void mobTick() {
+ // Airplane - dynamic tick
+ if (!gg.airplane.AirplaneConfig.dynamicHoglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) {
this.world.getMethodProfiler().enter("hoglinBrain");
this.getBehaviorController().a((WorldServer) this.world, (EntityHoglin) this); // Airplane - decompile error
this.world.getMethodProfiler().exit();
HoglinAI.a(this);
+ }
+ // Airplane end
if (this.isConverting()) {
++this.conversionTicks;
if (this.conversionTicks > 300) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
index d100b39c420e2326e869aa4059fc800d4c2fc0e4..48acef830eb1d919499e9b79dc6a9af4bdf8a17b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
@@ -244,12 +244,17 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
return !this.cannotHunt;
}
+ private int behaviorTick; // Airplane
@Override
protected void mobTick() {
+ // Airplane - dynamic tick
+ if (!gg.airplane.AirplaneConfig.dynamicPiglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) {
this.world.getMethodProfiler().enter("piglinBrain");
this.getBehaviorController().a((WorldServer) this.world, (EntityPiglin) this); // Airplane - compile error
this.world.getMethodProfiler().exit();
PiglinAI.b(this);
+ }
+ // Airplane end
super.mobTick();
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
index 2d0b83923d58cc7b6918b4e2ff2bece13ca26899..d8028675fc82883d716bcfb44431ca6ac7dfda36 100644
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
@@ -231,11 +231,17 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
}
// Spigot End
+ private int behaviorTick = 0;
+
@Override
protected void mobTick() { mobTick(false); }
protected void mobTick(boolean inactive) {
this.world.getMethodProfiler().enter("villagerBrain");
- if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
+ if (!inactive) {
+ if (!gg.airplane.AirplaneConfig.dynamicVillagerBehavior || behaviorTick++ % this.activatedPriority == 0) {
+ this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
+ }
+ }
this.world.getMethodProfiler().exit();
if (this.bF) {
this.bF = false;
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 05b165f4f2de1f09164c33c0b222dc660c86ebb9..7cc27df3c9429ccd840b394fcc3b96215a8449ac 100644
index 5c2eaca0bc63c7880ee928aba6a24761737aa649..6c4c4580faef39e48de5af4db003cf2e3b8a99b5 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -49,6 +49,9 @@ import net.minecraft.server.EntityInsentient;
import net.minecraft.server.EntityLlama;
import net.minecraft.server.EntityWaterAnimal;
@@ -47,6 +47,9 @@ import net.minecraft.world.entity.schedule.Activity;
import net.minecraft.world.entity.item.EntityFallingBlock;
import net.minecraft.world.entity.projectile.EntityEnderSignal;
// Paper end
+// Airplane start
+import net.minecraft.server.Vec3D;
+import net.minecraft.world.phys.Vec3D;
+// Airplane end
public class ActivationRange
{
@@ -230,7 +233,7 @@ public class ActivationRange
@@ -227,7 +230,7 @@ public class ActivationRange
Chunk chunk = chunkProvider.getChunkAtIfLoadedMainThreadNoCache( i1, j1 ); // Paper
if ( chunk != null )
{
@ -220,7 +215,7 @@ index 05b165f4f2de1f09164c33c0b222dc660c86ebb9..7cc27df3c9429ccd840b394fcc3b9621
}
}
}
@@ -243,7 +246,7 @@ public class ActivationRange
@@ -240,7 +243,7 @@ public class ActivationRange
*
* @param chunk
*/
@ -229,7 +224,7 @@ index 05b165f4f2de1f09164c33c0b222dc660c86ebb9..7cc27df3c9429ccd840b394fcc3b9621
{
// Paper start
Entity[] rawData = chunk.entities.getRawData();
@@ -252,11 +255,19 @@ public class ActivationRange
@@ -249,11 +252,19 @@ public class ActivationRange
//for ( Entity entity : (Collection<Entity>) slice )
// Paper end
{

View File

@ -8,13 +8,29 @@ getStructureStarts, it inlines getFeatureStarts so it doesn't have to
calculate an entire list when it returns early. As well, it uses a
LongIterator in order to not allocate longs for each position.
diff --git a/src/main/java/net/minecraft/server/StructureManager.java b/src/main/java/net/minecraft/server/StructureManager.java
index 2598ae3710d46c2cfd2be5d6be2a56e59ceef6ea..fd1f1e2d7e4be227697f534bdc6d9c52ceeeda4b 100644
--- a/src/main/java/net/minecraft/server/StructureManager.java
+++ b/src/main/java/net/minecraft/server/StructureManager.java
@@ -5,6 +5,11 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; // Paper
import java.util.stream.Stream;
import javax.annotation.Nullable;
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/world/level/StructureManager.java b/src/main/java/net/minecraft/world/level/StructureManager.java
index acacbf9617f99b97fc7fd2ba718775e1b3e429e9..967ae0212028d57d366497f7f25c61776c1ac3f2 100644
--- a/src/main/java/net/minecraft/world/level/StructureManager.java
+++ b/src/main/java/net/minecraft/world/level/StructureManager.java
@@ -15,6 +15,11 @@ import net.minecraft.world.level.levelgen.feature.StructureGenerator;
import net.minecraft.world.level.levelgen.structure.StructurePiece;
import net.minecraft.world.level.levelgen.structure.StructureStart;
+// Airplane start
+import it.unimi.dsi.fastutil.longs.LongIterator;
@ -24,7 +40,7 @@ index 2598ae3710d46c2cfd2be5d6be2a56e59ceef6ea..fd1f1e2d7e4be227697f534bdc6d9c52
public class StructureManager {
private final GeneratorAccess a; public GeneratorAccess getLevel() { return a; } // Paper - OBFHELPER
@@ -41,13 +46,15 @@ public class StructureManager {
@@ -51,13 +56,15 @@ public class StructureManager {
public java.util.List<StructureStart<?>> getFeatureStarts(SectionPosition sectionPosition, StructureGenerator<?> structureGenerator, IWorldReader world) {
// Tuinity end - add world parameter
java.util.List<StructureStart<?>> list = new ObjectArrayList<>();
@ -43,7 +59,7 @@ index 2598ae3710d46c2cfd2be5d6be2a56e59ceef6ea..fd1f1e2d7e4be227697f534bdc6d9c52
return list;
}
// Paper end
@@ -75,7 +82,18 @@ public class StructureManager {
@@ -85,7 +92,18 @@ public class StructureManager {
}
public StructureStart<?> getStructureStarts(BlockPosition blockposition, boolean flag, StructureGenerator<?> structuregenerator, IWorldReader world) {
// Paper start - remove structure streams
@ -63,7 +79,7 @@ index 2598ae3710d46c2cfd2be5d6be2a56e59ceef6ea..fd1f1e2d7e4be227697f534bdc6d9c52
if (structurestart.c().b(blockposition)) {
if (!flag) {
return structurestart;
@@ -86,7 +104,10 @@ public class StructureManager {
@@ -96,7 +114,10 @@ public class StructureManager {
}
}
}

View File

@ -7,40 +7,27 @@ The reasoning for reusing it in ChunkRegionLoader is because ThreadLocal
lookups are fairly expensive, and if we put it in DataPaletteBlock the
ThreadLocal lookup would happen 18 times.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 5f04591193d58ba7897194142da5efcbec3763dd..e77da341b765725771726283d3a8249b514b40da 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -424,6 +424,7 @@ public class ChunkRegionLoader {
public static NBTTagCompound saveChunk(WorldServer worldserver, IChunkAccess ichunkaccess) {
return saveChunk(worldserver, ichunkaccess, null);
}
+ private static final ThreadLocal<int[]> paletteArray = ThreadLocal.withInitial(() -> new int[4096]); // Airplane
public static NBTTagCompound saveChunk(WorldServer worldserver, IChunkAccess ichunkaccess, AsyncSaveData asyncsavedata) {
// Paper end
// Tuinity start - rewrite light impl
@@ -454,6 +455,7 @@ public class ChunkRegionLoader {
NBTTagCompound nbttagcompound2;
+ int[] aint = paletteArray.get(); // Airplane - use cached
for (int i = -1; i < 17; ++i) { // Paper - conflict on loop parameter change
int finalI = i; // CraftBukkit - decompile errors
ChunkSection chunksection = (ChunkSection) Arrays.stream(achunksection).filter((chunksection1) -> {
@@ -474,7 +476,7 @@ public class ChunkRegionLoader {
nbttagcompound2 = new NBTTagCompound();
nbttagcompound2.setByte("Y", (byte) (i & 255));
if (chunksection != Chunk.a) {
- chunksection.getBlocks().a(nbttagcompound2, "Palette", "BlockStates");
+ chunksection.getBlocks().a(nbttagcompound2, "Palette", "BlockStates", aint); // Airplane
}
if (nibblearray != null && !nibblearray.c()) {
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 73163b417af7e522a4509bf9c1ab56d6499be622..2855a2757c35afc5751a7ca6f3a12cc27c24bf96 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -226,12 +226,16 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
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/world/level/chunk/DataPaletteBlock.java b/src/main/java/net/minecraft/world/level/chunk/DataPaletteBlock.java
index a6937366cd9c9d708edb5cd1ab3ac096e7b2032e..a579c5bf9e20c74aa3bf8ef6bc00576409805ca6 100644
--- a/src/main/java/net/minecraft/world/level/chunk/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/world/level/chunk/DataPaletteBlock.java
@@ -235,12 +235,16 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
this.b();
}
@ -58,3 +45,32 @@ index 73163b417af7e522a4509bf9c1ab56d6499be622..2855a2757c35afc5751a7ca6f3a12cc2
for (int j = 0; j < 4096; ++j) {
T t1 = this.a(j);
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
index ec2b238480413ba9c123d9ddeaa787d9520e1b74..bf96f9e538fc29ca914536e8a7ce727ebe43a8b2 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
@@ -468,6 +468,7 @@ public class ChunkRegionLoader {
public static NBTTagCompound saveChunk(WorldServer worldserver, IChunkAccess ichunkaccess) {
return saveChunk(worldserver, ichunkaccess, null);
}
+ private static final ThreadLocal<int[]> paletteArray = ThreadLocal.withInitial(() -> new int[4096]); // Airplane
public static NBTTagCompound saveChunk(WorldServer worldserver, IChunkAccess ichunkaccess, AsyncSaveData asyncsavedata) {
// Paper end
// Tuinity start - rewrite light impl
@@ -498,6 +499,7 @@ public class ChunkRegionLoader {
NBTTagCompound nbttagcompound2;
+ int[] aint = paletteArray.get(); // Airplane - use cached
for (int i = -1; i < 17; ++i) { // Paper - conflict on loop parameter change
int finalI = i; // CraftBukkit - decompile errors
ChunkSection chunksection = (ChunkSection) Arrays.stream(achunksection).filter((chunksection1) -> {
@@ -518,7 +520,7 @@ public class ChunkRegionLoader {
nbttagcompound2 = new NBTTagCompound();
nbttagcompound2.setByte("Y", (byte) (i & 255));
if (chunksection != Chunk.a) {
- chunksection.getBlocks().a(nbttagcompound2, "Palette", "BlockStates");
+ chunksection.getBlocks().a(nbttagcompound2, "Palette", "BlockStates", aint); // Airplane
}
if (nibblearray != null && !nibblearray.c()) {

View File

@ -3,12 +3,35 @@ From: Paul Sauve <paul@technove.co>
Date: Thu, 4 Feb 2021 23:33:52 -0600
Subject: [PATCH] Reduce chunk loading & lookups
Airplane
Copyright (C) 2020 Technove LLC
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index df4d5ed5957658ee9ca083ac79b38a1202fe7015..e7568e3df10bc07e9b3b05caa9d41398925cf4d7 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -279,11 +279,18 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java
index e993b1849beb60515c51ee4f37617faab63ca223..4d7b5d47ab6bd3b1408811c3b9c157b1eb5c30ae 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java
@@ -57,6 +57,7 @@ import net.minecraft.world.level.World;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.chunk.Chunk;
import net.minecraft.world.level.pathfinder.PathType;
import net.minecraft.world.phys.AxisAlignedBB;
import net.minecraft.world.phys.MovingObjectPositionBlock;
@@ -314,11 +315,18 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
private boolean p(double d0, double d1, double d2) {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(d0, d1, d2);
@ -29,11 +52,11 @@ index df4d5ed5957658ee9ca083ac79b38a1202fe7015..e7568e3df10bc07e9b3b05caa9d41398
boolean flag = iblockdata.getMaterial().isSolid();
boolean flag1 = iblockdata.getFluid().a((Tag) TagsFluid.WATER);
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index ad520cb36afd0f011b6337f3e42efb01f740a950..b5b0f295d63eb245a6221f88110f1bb1694c641c 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -381,7 +381,10 @@ public final class SpawnerCreature {
diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
index d497006f05f79015cd791849888832bb53f4a414..d98526785ff2fa3b72e8ffffcb89a57a2203a5c8 100644
--- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
@@ -415,7 +415,10 @@ public final class SpawnerCreature {
}
private static List<BiomeSettingsMobs.c> a(WorldServer worldserver, StructureManager structuremanager, ChunkGenerator chunkgenerator, EnumCreatureType enumcreaturetype, BlockPosition blockposition, @Nullable BiomeBase biomebase) {

View File

@ -19,11 +19,11 @@ 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 83702e07dff72b639af32c8ba9e831e58da92a10..a48f2f82517bc391d5d5b7961e3c7a75175abb65 100644
--- a/src/main/java/net/minecraft/server/BehaviorFindPosition.java
+++ b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
@@ -57,6 +57,7 @@ public class BehaviorFindPosition extends Behavior<EntityCreature> {
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java
index bc8786e2aaeab4dbae4e9c7666ad816bc5bfac3f..09133c5822bc1386bc3d8a5f3c94196420bbfaea 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java
@@ -67,6 +67,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);
@ -31,11 +31,11 @@ index 83702e07dff72b639af32c8ba9e831e58da92a10..a48f2f82517bc391d5d5b7961e3c7a75
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 cba6f414d1a673e735f80662620a8bec78cd09ab..88368ae1633cf8bfb845d52b38110a6828fcf699 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 {
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
index 148bdbc2cffb002d8b6dd05e70854ab503804949..48e6a4c588ef39a4bde067d79b96a656c68750ce 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
@@ -433,6 +433,7 @@ public abstract class NavigationAbstract {
}
}

View File

@ -20,10 +20,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/pom.xml b/pom.xml
index 752d62eb3b87ab24260ec2c029bae0d2b0e3b908..02bbe784d0a062dd643e37f3ad04b77a78144828 100644
index a3a3b17f3b30b55bb50905353e77723091bb5c1f..fc2c3714b6c772d67e258be269aa92dda80cdb12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -161,6 +161,13 @@
@@ -159,8 +159,23 @@
<version>1.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
@ -36,24 +36,22 @@ index 752d62eb3b87ab24260ec2c029bae0d2b0e3b908..02bbe784d0a062dd643e37f3ad04b77a
+ </dependency>
</dependencies>
<repositories>
@@ -174,6 +181,11 @@
<id>spigotmc-public</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
+ <repositories>
+ <!-- Airplane - Flare -->
+ <repository>
+ <id>jitpack.io</id>
+ <url>https://jitpack.io</url>
+ </repository>
</repositories>
<pluginRepositories>
+ </repositories>
+
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
<finalName>tuinity-${minecraft.version}</finalName>
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
index c39c9929a251b41ab60e1509b4e6c90d0825dc0c..4f87df936d0092cbf8cb2a6db9b57f235c287beb 100644
index e0bed57aa5547a214ad779dbd0f648f3663147f9..39ef53c9dd49d5951103777002f866a64a252bfd 100644
--- a/src/main/java/gg/airplane/AirplaneConfig.java
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
@@ -68,4 +68,26 @@ public class AirplaneConfig {
@@ -69,4 +69,26 @@ public class AirplaneConfig {
dynamicHoglinBehavior = manual.get("behavior-activation.hoglin", dynamicHoglinBehavior);
}
@ -205,21 +203,21 @@ index 0000000000000000000000000000000000000000..f4976428bc721319d2926e97cbe0f64c
+}
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..e3ef62ae97b8b92459e1c405525790ba2172df01
index 0000000000000000000000000000000000000000..ddc90f1589e683f452c5a74d9d2408803edea029
--- /dev/null
+++ b/src/main/java/gg/airplane/flare/FlareCommand.java
@@ -0,0 +1,159 @@
@@ -0,0 +1,149 @@
+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 net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.event.ClickEvent;
+import net.kyori.adventure.text.format.NamedTextColor;
+import net.kyori.adventure.text.format.TextColor;
+import net.kyori.adventure.text.format.TextDecoration;
+import org.bukkit.Bukkit;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
@ -234,21 +232,14 @@ index 0000000000000000000000000000000000000000..e3ef62ae97b8b92459e1c405525790ba
+public class FlareCommand extends Command {
+
+ private static final String BASE_URL = "https://blog.airplane.gg/flare-tutorial/#setting-the-access-token";
+ 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;
+ }
+ private static final TextColor HEX = TextColor.fromHexString("#e3eaea");
+ private static final Component PREFIX = Component.text()
+ .append(Component.text("Flare ✈")
+ .color(TextColor.fromHexString("#6a7eda"))
+ .decoration(TextDecoration.BOLD, true)
+ .append(Component.text(" ", HEX)
+ .decoration(TextDecoration.BOLD, false)))
+ .asComponent();
+
+ public FlareCommand() {
+ super("flare", "Profile your server with Flare", "/flare", Collections.singletonList("profile"));
@ -259,36 +250,28 @@ index 0000000000000000000000000000000000000000..e3ef62ae97b8b92459e1c405525790ba
+ public boolean execute(CommandSender sender, String commandLabel, String[] args) {
+ if (!testPermission(sender)) return true;
+ if (AirplaneConfig.accessToken.length() == 0) {
+ BaseComponent clickable = new TextComponent(BASE_URL);
+ clickable.setUnderlined(true);
+ clickable.setColor(HEX);
+ clickable.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, BASE_URL));
+ Component clickable = Component.text(BASE_URL, HEX, TextDecoration.UNDERLINED).clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, BASE_URL));
+
+ sender.sendMessage(create(new ComponentBuilder("Flare currently requires an access token to use. To learn more, visit ")
+ .color(HEX)
+ .append(clickable)
+ )
+ .create());
+ sender.sendMessage(PREFIX.append(Component.text("Flare currently requires an access token to use. To learn more, visit ").color(HEX).append(clickable)));
+ return true;
+ }
+
+ if (AsyncProfilerIntegration.doesNotSupportProfiling()) {
+ sender.sendMessage(create(new ComponentBuilder("Profiling is not supported in this environment, reason: " + AsyncProfilerIntegration.getDisabledReason())
+ .color(ChatColor.RED)
+ ).create());
+ sender.sendMessage(PREFIX.append(
+ Component.text("Profiling is not supported in this environment, reason: " + AsyncProfilerIntegration.getDisabledReason(), NamedTextColor.RED)));
+ return true;
+ }
+ if (ProfilingManager.isProfiling()) {
+ if (args.length == 1 && args[0].equalsIgnoreCase("status")) {
+ sender.sendMessage(create(new ComponentBuilder("Status: " + AsyncProfilerIntegration.status())).create());
+ sender.sendMessage(PREFIX.append(Component.text("Status: " + AsyncProfilerIntegration.status(), HEX)));
+ return true;
+ }
+ if (ProfilingManager.stop()) {
+ if (!(sender instanceof ConsoleCommandSender)) {
+ sender.sendMessage(create(new ComponentBuilder("Profiling has been stopped.")).create());
+ sender.sendMessage(PREFIX.append(Component.text("Profiling has been stopped.", HEX)));
+ }
+ } else {
+ sender.sendMessage(create(new ComponentBuilder("Profiling has already been stopped.")).create());
+ sender.sendMessage(PREFIX.append(Component.text("Profiling has already been stopped.", HEX)));
+ }
+ } else {
+ ProfileType profileType = null;
@ -296,10 +279,11 @@ index 0000000000000000000000000000000000000000..e3ef62ae97b8b92459e1c405525790ba
+ 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;
+ sender.sendMessage(PREFIX.append(Component
+ .text("Invalid profile type ", HEX)
+ .append(Component.text(args[0], HEX, TextDecoration.BOLD)
+ .append(Component.text("!", HEX)))
+ ));
+ }
+ }
+ int interval = 5;
@ -307,10 +291,12 @@ index 0000000000000000000000000000000000000000..e3ef62ae97b8b92459e1c405525790ba
+ 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;
+ sender.sendMessage(PREFIX.append(Component
+ .text("Invalid time in milliseconds ", HEX)
+ .append(Component.text(args[1], HEX, TextDecoration.BOLD)
+ .append(Component.text("!", HEX)))
+ ));
+ return true;
+ }
+ }
+ int finalInterval = interval;
@ -319,18 +305,20 @@ index 0000000000000000000000000000000000000000..e3ef62ae97b8b92459e1c405525790ba
+ 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());
+ sender.sendMessage(PREFIX.append(Component
+ .text("Flare has been started: " + ProfilingManager.getProfilingUrl().get(), HEX)
+ .clickEvent(ClickEvent.openUrl(ProfilingManager.getProfilingUrl().get()))
+ ));
+ sender.sendMessage(PREFIX.append(Component.text(" Run /" + commandLabel + " to stop the Flare.", HEX)));
+ }
+ } 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());
+ sender.sendMessage(PREFIX.append(Component
+ .text("Flare has already been started: " + ProfilingManager.getProfilingUrl().get(), HEX)
+ .clickEvent(ClickEvent.openUrl(ProfilingManager.getProfilingUrl().get()))
+ ));
+ }
+ } catch (UserReportableException e) {
+ sender.sendMessage(create(new ComponentBuilder("Profiling failed to start: " + e.getUserError())).create());
+ sender.sendMessage(Component.text("Flare failed to start: " + e.getUserError(), NamedTextColor.RED));
+ e.printStackTrace();
+ }
+ });

View File

@ -37,15 +37,15 @@ index be408aebbccbda46e8aa82ef337574137cfa0096..b9bdce7c7ca8b7b107b0dca165d72232
protected final double maxFragFactor;
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
index 4f87df936d0092cbf8cb2a6db9b57f235c287beb..424325ada75b788ce390378d8df0116e5c50cf3d 100644
index 39ef53c9dd49d5951103777002f866a64a252bfd..3886c731a69540f638d57a411285da289d3b704b 100644
--- a/src/main/java/gg/airplane/AirplaneConfig.java
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
@@ -90,4 +90,18 @@ public class AirplaneConfig {
@@ -91,4 +91,18 @@ public class AirplaneConfig {
}
}
+
+ public static boolean multithreadedEntityTracker = true;
+ public static boolean multithreadedEntityTracker = false;
+ public static boolean entityTrackerAsyncPackets = false;
+
+ private static void entityTracker() {
@ -61,14 +61,14 @@ index 4f87df936d0092cbf8cb2a6db9b57f235c287beb..424325ada75b788ce390378d8df0116e
}
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..e72229128285e1a48b9b461620620976ca0dc0a4
index 0000000000000000000000000000000000000000..ae7c5430b4f5970ede602bb234b5ffcee424f6a7
--- /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.world.level.chunk.Chunk;
+import net.minecraft.server.MinecraftServer;
+import org.apache.logging.log4j.Level;
+
@ -149,42 +149,11 @@ index 0000000000000000000000000000000000000000..e72229128285e1a48b9b461620620976
+ }
+
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 045b4af6721817b3dbfb05b9aec0bf382de9fcf5..6cde93d62c4c324a6544401cabe045cbb80f465e 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 e384a24d9b46587f66ee3e712a8206b1ca1f3877..8071e8ec7bb505e026ceead84377e61063864bc5 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 {
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 59989db6dcf96a8ab5a75775bb588c31cec3418a..534c7266fe9d6f60b74a71e5e61ed248e515dffd 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -182,7 +182,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public NetworkManager networkManager; // Paper
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
@ -193,11 +162,11 @@ index e384a24d9b46587f66ee3e712a8206b1ca1f3877..8071e8ec7bb505e026ceead84377e610
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 {
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
index a1512ee8422fa39a95e4f19c86fe71b77af54ca0..c830b257054b7f8153aa9225c1f61f49a6ea0a84 100644
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
@@ -75,6 +75,10 @@ public class EntityTrackerEntry {
* Requested in https://github.com/PaperMC/Paper/issues/1537 to allow intercepting packets
*/
public void sendPlayerPacket(EntityPlayer player, Packet packet) {
@ -208,7 +177,7 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
player.playerConnection.sendPacket(packet);
}
@@ -74,7 +78,7 @@ public class EntityTrackerEntry {
@@ -103,7 +107,7 @@ public class EntityTrackerEntry {
public final void tick() { this.a(); } // Paper - OBFHELPER
public void a() {
@ -217,7 +186,7 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
List<Entity> list = this.tracker.passengers; // Paper - do not copy list
if (!list.equals(this.p)) {
@@ -88,6 +92,8 @@ public class EntityTrackerEntry {
@@ -117,6 +121,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
@ -226,7 +195,7 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
WorldMap worldmap = ItemWorldMap.getSavedMap(itemstack, this.b);
Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit
@@ -101,6 +107,8 @@ public class EntityTrackerEntry {
@@ -130,6 +136,8 @@ public class EntityTrackerEntry {
entityplayer.playerConnection.sendPacket(packet);
}
}
@ -235,7 +204,7 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
}
this.c();
@@ -245,18 +253,25 @@ public class EntityTrackerEntry {
@@ -264,18 +272,25 @@ public class EntityTrackerEntry {
// CraftBukkit start - Create PlayerVelocity event
boolean cancelled = false;
@ -265,7 +234,7 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
}
if (!cancelled) {
@@ -356,7 +371,9 @@ public class EntityTrackerEntry {
@@ -359,7 +374,9 @@ public class EntityTrackerEntry {
if (!list.isEmpty()) {
consumer.accept(new PacketPlayOutEntityEquipment(this.tracker.getId(), list));
}
@ -275,7 +244,7 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
}
// CraftBukkit start - Fix for nonsensical head yaw
@@ -434,6 +451,10 @@ public class EntityTrackerEntry {
@@ -437,6 +454,10 @@ public class EntityTrackerEntry {
// Paper end
private void broadcastIncludingSelf(Packet<?> packet) {
@ -286,11 +255,11 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
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 3e0bf6df7c4608a5b19024612db52558fd722f4b..74bb2573aa4f52a30341b3763f60a895d7b7a068 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -731,6 +731,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927ce734b407 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
@@ -785,6 +785,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return (PlayerChunk) (this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap)this.visibleChunks).safeGet(i));
// Paper end
}
@ -302,7 +271,7 @@ index 3e0bf6df7c4608a5b19024612db52558fd722f4b..74bb2573aa4f52a30341b3763f60a895
protected final IntSupplier getPrioritySupplier(long i) { return c(i); } // Paper - OBFHELPER
protected IntSupplier c(long i) {
@@ -2134,10 +2139,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -2188,10 +2193,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entity.tracker = null; // Paper - We're no longer tracked
}
@ -333,27 +302,27 @@ index 3e0bf6df7c4608a5b19024612db52558fd722f4b..74bb2573aa4f52a30341b3763f60a895
com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
try {
while (iterator.hasNext()) {
@@ -2403,7 +2428,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2457,7 +2482,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
+ public final Entity tracker; // Airplane - public for chunk
private final int trackingDistance;
private SectionPosition e;
// Paper start
@@ -2422,7 +2447,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2476,7 +2501,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
+ public 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
+ public 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;
@@ -2463,7 +2490,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2517,7 +2544,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
return this.tracker.getId();
}
@ -368,7 +337,7 @@ index 3e0bf6df7c4608a5b19024612db52558fd722f4b..74bb2573aa4f52a30341b3763f60a895
Iterator iterator = this.trackedPlayers.iterator();
while (iterator.hasNext()) {
@@ -2475,6 +2508,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2529,6 +2562,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
}
public void broadcastIncludingSelf(Packet<?> packet) {
@ -381,7 +350,7 @@ index 3e0bf6df7c4608a5b19024612db52558fd722f4b..74bb2573aa4f52a30341b3763f60a895
this.broadcast(packet);
if (this.tracker instanceof EntityPlayer) {
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
@@ -2501,8 +2540,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2555,8 +2594,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
}
@ -392,7 +361,7 @@ index 3e0bf6df7c4608a5b19024612db52558fd722f4b..74bb2573aa4f52a30341b3763f60a895
if (entityplayer != this.tracker) {
// Paper start - remove allocation of Vec3D here
//Vec3D vec3d = entityplayer.getPositionVector().d(this.tracker.getPositionVector()); // MC-155077, SPIGOT-5113
@@ -2518,7 +2557,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2572,7 +2611,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
if (!flag1) {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ);
@ -401,3 +370,34 @@ index 3e0bf6df7c4608a5b19024612db52558fd722f4b..74bb2573aa4f52a30341b3763f60a895
if (playerchunk != null && playerchunk.getSendingChunk() != null && PlayerChunkMap.this.playerChunkManager.isChunkSent(entityplayer, MathHelper.floor(this.tracker.locX()) >> 4, MathHelper.floor(this.tracker.locZ()) >> 4)) { // Paper - no-tick view distance // Tuinity - don't broadcast in chunks the player hasn't received
flag1 = PlayerChunkMap.b(chunkcoordintpair, entityplayer, false) <= PlayerChunkMap.this.viewDistance;
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
index 226f9e5a3d867b5365f3ea44c1459ed7265c1b41..4f5f9eb110cf71a966d1365c7813ba55b5127890 100644
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
@@ -111,6 +111,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);
}

View File

@ -4,11 +4,11 @@ Date: Sat, 13 Mar 2021 10:19:15 -0600
Subject: [PATCH] Skip copying unloading tile entities
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9d6ddfec93f49f80fdc88248fc5aaf5ad6ee48da..bdb0e46d9196f4ac164ed09fd9d01db60aaab401 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -44,7 +44,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index bbc842a173b12a96b1b63af347d2196ac1cb5f73..938a8732d1d57ae0cf424fa17c5c5b08cc5df37b 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -106,7 +106,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
//public final List<TileEntity> tileEntityList = Lists.newArrayList(); // Paper - remove unused list
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
protected final List<TileEntity> tileEntityListPending = Lists.newArrayList();
@ -17,7 +17,7 @@ index 9d6ddfec93f49f80fdc88248fc5aaf5ad6ee48da..bdb0e46d9196f4ac164ed09fd9d01db6
public final Thread serverThread;
private final boolean debugWorld;
private int d;
@@ -969,12 +969,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -986,12 +986,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
gameprofilerfiller.enter("blockEntities");
timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) {

View File

@ -4,11 +4,11 @@ Date: Sat, 13 Mar 2021 10:40:22 -0600
Subject: [PATCH] Reduce entity chunk ticking checks from 3 to 1
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7660d098046100a4ab168149604ec196a4eea03d..4e7700443c4f0725c0d032b620f84fcfadbde7a1 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -988,11 +988,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index b33f37309d4dd22c033ad84effa4ff9d6e20a790..b788c33605fc96d17758cf42e508872e38fb4322 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1081,11 +1081,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit end */
gameprofilerfiller.enter("checkDespawn");
@ -22,7 +22,7 @@ index 7660d098046100a4ab168149604ec196a4eea03d..4e7700443c4f0725c0d032b620f84fcf
this.updateNavigatorsInRegion(entity);
}
} else {
@@ -1022,7 +1023,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1115,7 +1116,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.entitiesById.remove(entity.getId()); // Tuinity
this.unregisterEntity(entity);
} else if (entity.inChunk && entity.valid) { // Tuinity start - optimise notify()
@ -31,7 +31,7 @@ index 7660d098046100a4ab168149604ec196a4eea03d..4e7700443c4f0725c0d032b620f84fcf
this.updateNavigatorsInRegion(entity);
}
} else {
@@ -1349,7 +1350,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1416,7 +1417,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
// Tuinity end - log detailed entity tick information
@ -42,7 +42,7 @@ index 7660d098046100a4ab168149604ec196a4eea03d..4e7700443c4f0725c0d032b620f84fcf
// Tuinity start - log detailed entity tick information
com.tuinity.tuinity.util.TickThread.ensureTickThread("Cannot tick an entity off-main");
try {
@@ -1357,7 +1360,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1424,7 +1427,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
currentlyTickingEntity.lazySet(entity);
}
// Tuinity end - log detailed entity tick information

View File

@ -4,11 +4,11 @@ Date: Sat, 13 Mar 2021 12:24:41 -0600
Subject: [PATCH] Remove iterators from inventory contains
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
index 3b65711b91c51ac7b4b5b2b0144ffd279fe60eeb..478f33dbbd0b5a9b81ee420f77c97fa8c40e27d6 100644
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
@@ -609,6 +609,8 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
diff --git a/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java b/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java
index 2df3ae0b72ccb5f816d55fed15396ba5a1affb7f..754a3ea18905b79ae5ae4fc2442c94f0611b6d0e 100644
--- a/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java
+++ b/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java
@@ -630,6 +630,8 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
}
public boolean h(ItemStack itemstack) {
@ -17,7 +17,7 @@ index 3b65711b91c51ac7b4b5b2b0144ffd279fe60eeb..478f33dbbd0b5a9b81ee420f77c97fa8
Iterator iterator = this.f.iterator();
while (iterator.hasNext()) {
@@ -623,6 +625,20 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
@@ -644,6 +646,20 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
}
}
}

View File

@ -4,11 +4,11 @@ Date: Sat, 13 Mar 2021 14:02:04 -0600
Subject: [PATCH] Cache entityhuman display name
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 5581e9f1b8656bd2ee0dd338ffd17ac8297df94f..708f9c5d0b6e30512b3d3ea45ec2b2baf9482669 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -65,7 +65,8 @@ public abstract class EntityHuman extends EntityLiving {
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
index 44038dd278b988508047023107683e5370af54ad..ad85dda5c50b797904824a08513fbcec042128ea 100644
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
@@ -162,7 +162,8 @@ public abstract class EntityHuman extends EntityLiving {
protected int bG;
protected final float bH = 0.02F;
private int g;
@ -18,7 +18,7 @@ index 5581e9f1b8656bd2ee0dd338ffd17ac8297df94f..708f9c5d0b6e30512b3d3ea45ec2b2ba
private ItemStack bL;
private final ItemCooldown bM;
@Nullable
@@ -1764,7 +1765,12 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1828,7 +1829,12 @@ public abstract class EntityHuman extends EntityLiving {
@Override
public IChatBaseComponent getDisplayName() {

View File

@ -4,11 +4,11 @@ Date: Sat, 13 Mar 2021 15:05:28 -0600
Subject: [PATCH] Early return optimization for target finding
diff --git a/src/main/java/net/minecraft/server/PathfinderTargetCondition.java b/src/main/java/net/minecraft/server/PathfinderTargetCondition.java
index 3ebe3d0dc4c2c6aee6ea349006a74cbe5aa8e78f..7b80f6f08f274fd1adff114a81919bf41bf2cd53 100644
--- a/src/main/java/net/minecraft/server/PathfinderTargetCondition.java
+++ b/src/main/java/net/minecraft/server/PathfinderTargetCondition.java
@@ -80,9 +80,17 @@ public class PathfinderTargetCondition {
diff --git a/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java b/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java
index 88972dd8252bd2d2d8e384d616484ff682949fa8..5e8d3b84cbad299e09e8f25bfc712d11e1d1068e 100644
--- a/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java
+++ b/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java
@@ -84,9 +84,17 @@ public class PathfinderTargetCondition {
}
if (this.b > 0.0D) {

View File

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Wed, 17 Mar 2021 13:00:57 -0500
Subject: [PATCH] More debug for plugins not shutting down tasks
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b5ffc5f5cf04892d30092625533643c99047c16b..aec6c036ed42078a6cc3540f1f6e46a551e87a2f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -978,6 +978,11 @@ public final class CraftServer implements Server {
plugin.getDescription().getName(),
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
));
+ getLogger().log(Level.SEVERE, String.format("%s Stacktrace", worker.getThread().getName()));
+ StackTraceElement[] stackTrace = worker.getThread().getStackTrace();
+ for (StackTraceElement element : stackTrace) {
+ getLogger().log(Level.SEVERE, " " + element.toString());
+ }
}
}
// Paper end

View File

@ -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 be48e686272b81dab4f1f584d946e15285934e88..806c699ce25525bc8a382a52e95644479e8ad708 100644
index e8146dad220330bdcc46e563172b40a66931d17c..34552a2bd96428013dba6f2bead737af75a28d0d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1329,6 +1329,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1441,6 +1441,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
//} // Paper
this.methodProfiler.enter("snooper");
@ -17,7 +17,7 @@ index be48e686272b81dab4f1f584d946e15285934e88..806c699ce25525bc8a382a52e9564447
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
this.snooper.a();
}
@@ -1336,6 +1338,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1448,6 +1450,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.ticks % 6000 == 0) { // Spigot
this.snooper.b();
}

View File

@ -5,11 +5,11 @@ Date: Thu, 2 Apr 2020 11:29:08 +0800
Subject: [PATCH] Avoid double I/O operation on load player file
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index b5cf60495b85c6ae6c32ee8a1c65d80e59fdce3d..1f77b251d7e7b0f023793cbf0876fc067caa75c1 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -49,7 +49,8 @@ public class WorldNBTStorage {
diff --git a/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java b/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java
index 4d30ca69dd303f1d76c8e6292021deda97851773..d9c2c7a20953fc3bcdd07d70233ccf6e3748b14b 100644
--- a/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java
@@ -56,7 +56,8 @@ public class WorldNBTStorage {
File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat");
// Spigot Start
boolean usingWrongFile = false;
@ -19,7 +19,7 @@ index b5cf60495b85c6ae6c32ee8a1c65d80e59fdce3d..1f77b251d7e7b0f023793cbf0876fc06
{
file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() )
@@ -60,7 +61,7 @@ public class WorldNBTStorage {
@@ -67,7 +68,7 @@ public class WorldNBTStorage {
}
// Spigot End

View File

@ -5,11 +5,11 @@ Date: Fri, 10 Apr 2020 15:47:15 +0800
Subject: [PATCH] Swaps the predicate order of collision
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 426bebc5cd67ffcc72ee56d437cc13f6846e109c..b8ae3f65ba8a923ad2b72e6d6b1db7a17fd08cb8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1630,8 +1630,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d321616b7f726f4ff307b46ced9efce6cc20b82f..590a2274c5c414c03e37219dca9cd10e9d3f8b89 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1723,8 +1723,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
public void pickup(EntityHuman entityhuman) {}
public void collide(Entity entity) {

View File

@ -4,11 +4,11 @@ Date: Wed, 15 Jun 2016 22:06:57 -0400
Subject: [PATCH] Don't trigger Lootable Refresh for non player interaction
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
index c6df2318762dc6542e73f18ed9a3172ee31d96ee..525e4730cb40c1ed86012cd75712c428eeb780c2 100644
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
@@ -50,6 +50,7 @@ public abstract class TileEntityLootable extends TileEntityContainer {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
index f0da819627035bed83561128a11059424d2b7e30..806a2e1a654bd917f635759725e6d7836b672f7d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
@@ -69,6 +69,7 @@ public abstract class TileEntityLootable extends TileEntityContainer {
}
public void d(@Nullable EntityHuman entityhuman) {

View File

@ -22,11 +22,11 @@ obc.i.u.CraftTileInventoryConverter$Lectern:
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 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
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLectern.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLectern.java
index 89618f652b5eea4a380b0f00a5e4f8007495a0ef..94562f7b0f5cde9f8b4a163cc2b8cf7ab6c5d897 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLectern.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLectern.java
@@ -44,6 +44,11 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
// CraftBukkit start - add fields and methods
public final IInventory inventory = new LecternInventory();
public class LecternInventory implements IInventory {
@ -38,7 +38,7 @@ index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a5
public List<HumanEntity> transaction = new ArrayList<>();
private int maxStack = 1;
@@ -76,7 +81,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -101,7 +106,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@Override
public ItemStack splitStack(int i, int j) {
@ -47,7 +47,7 @@ index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a5
ItemStack itemstack = TileEntityLectern.this.book.cloneAndSubtract(j);
if (TileEntityLectern.this.book.isEmpty()) {
@@ -91,7 +96,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -116,7 +121,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@Override
public ItemStack splitWithoutUpdate(int i) {
@ -56,7 +56,7 @@ index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a5
ItemStack itemstack = TileEntityLectern.this.book;
TileEntityLectern.this.book = ItemStack.b;
@@ -126,7 +131,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -151,7 +156,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@Override
public boolean a(EntityHuman entityhuman) {
@ -65,7 +65,7 @@ index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a5
}
@Override
@@ -159,6 +164,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -184,6 +189,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
private ItemStack book;
private int page;
private int maxPage;
@ -73,7 +73,7 @@ index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a5
public TileEntityLectern() {
super(TileEntityTypes.LECTERN);
@@ -180,6 +186,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -205,6 +211,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
}
private void k() {
@ -81,7 +81,7 @@ index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a5
this.page = 0;
this.maxPage = 0;
BlockLectern.setHasBook(this.getWorld(), this.getPosition(), this.getBlock(), false);
@@ -197,6 +204,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -222,6 +229,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
if (j != this.page) {
this.page = j;
@ -90,18 +90,18 @@ index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a5
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 fc1cf7cc6b26171c0baf623f04f6b495d5adf517..fb3af03ca8b23a401efd56891b4efea510d1a449 100644
index b99423b3b413fc6364c6530a99e3c74dd406e1b4..011426d0ce66299e50bd6dd2295e27bb2a873eb3 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;
import net.minecraft.server.PacketPlayOutOpenWindow;
import net.minecraft.server.TileEntity;
import net.minecraft.server.TileEntityContainer;
+import net.minecraft.server.TileEntityLectern; // EMC
@@ -31,6 +31,7 @@ import net.minecraft.world.level.block.BlockWorkbench;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.TileEntity;
import net.minecraft.world.level.block.entity.TileEntityContainer;
+import net.minecraft.world.level.block.entity.TileEntityLectern; // EMC
import net.minecraft.world.level.block.entity.TileEntitySign;
import net.minecraft.world.level.block.state.IBlockData;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -299,6 +300,11 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -301,6 +302,11 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
if (craft.getInventory() instanceof ITileInventory) {
iinventory = (ITileInventory) craft.getInventory();
}
@ -114,7 +114,7 @@ index fc1cf7cc6b26171c0baf623f04f6b495d5adf517..fb3af03ca8b23a401efd56891b4efea5
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 b99ce1217461595f5ccc8c7565ec3b65d1df83d9..efcc5b534bbfdcacf883940e274f00ea11f957a4 100644
index 2bd4e644ffbde2e1133b25824a2829bc6b33fa84..06cd47ea0ab93ba9ef92e32a34118102070b582a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
@@ -159,8 +159,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat

View File

@ -4,25 +4,11 @@ Date: Mon, 16 Mar 2020 03:07:02 -0400
Subject: [PATCH] dont load chunks for physics
diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java
index 657885cdaa086293f6b5aa6f3058acd16df0ba35..8724ad342bec7c733b3c825bd62dbfa5c28c06dd 100644
--- a/src/main/java/net/minecraft/server/BlockBase.java
+++ b/src/main/java/net/minecraft/server/BlockBase.java
@@ -593,7 +593,8 @@ public abstract class BlockBase {
EnumDirection enumdirection = aenumdirection[l];
blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, enumdirection);
- IBlockData iblockdata = generatoraccess.getType(blockposition_mutableblockposition);
+ IBlockData iblockdata = generatoraccess.getTypeIfLoaded(blockposition_mutableblockposition); // EMC
+ if (iblockdata == null) continue; // EMC
IBlockData iblockdata1 = iblockdata.updateState(enumdirection.opposite(), this.p(), generatoraccess, blockposition_mutableblockposition, blockposition);
Block.a(iblockdata, iblockdata1, generatoraccess, blockposition_mutableblockposition, i, j);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index bdb0e46d9196f4ac164ed09fd9d01db60aaab401..27b39f63fa9c340e0b9f2ed82448c870c40ac5c7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -805,7 +805,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index f0588f5728e476185467d1f4e50b8647df6788dd..fc527d453765c11b988bb78d8f88e948fdac2f9d 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -868,7 +868,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) {
@ -32,3 +18,17 @@ index bdb0e46d9196f4ac164ed09fd9d01db60aaab401..27b39f63fa9c340e0b9f2ed82448c870
try {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
index 5e8b3791ebec2f745af2527dc52c792f30f63106..052ca0f8292a30dda3cc02ed54ae550174de86a7 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
@@ -646,7 +646,8 @@ public abstract class BlockBase {
EnumDirection enumdirection = aenumdirection[l];
blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, enumdirection);
- IBlockData iblockdata = generatoraccess.getType(blockposition_mutableblockposition);
+ IBlockData iblockdata = generatoraccess.getTypeIfLoaded(blockposition_mutableblockposition); // EMC
+ if (iblockdata == null) continue; // EMC
IBlockData iblockdata1 = iblockdata.updateState(enumdirection.opposite(), this.p(), generatoraccess, blockposition_mutableblockposition, blockposition);
Block.a(iblockdata, iblockdata1, generatoraccess, blockposition_mutableblockposition, i, j);

View File

@ -128,11 +128,11 @@ index 0000000000000000000000000000000000000000..fe7330fabe386966c2d203a190a00a78
+
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 27b39f63fa9c340e0b9f2ed82448c870c40ac5c7..e280afce30ddc0c2ec54945543ad65b4ebfa71f2 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -97,6 +97,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index fc527d453765c11b988bb78d8f88e948fdac2f9d..171c6e0e9e4718246b81bb9d7514d1f3290bf852 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -160,6 +160,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur
@ -141,16 +141,16 @@ index 27b39f63fa9c340e0b9f2ed82448c870c40ac5c7..e280afce30ddc0c2ec54945543ad65b4
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPosition lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
@@ -230,6 +232,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig(((WorldDataServer) worlddatamutable).getName(), env); // Purpur
+ this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Origami - World Config
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
@@ -294,6 +296,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()), env); // Purpur
+ this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Origami - World Config
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f9fd40d33ac72f859a0a7012dbab348fca40c375..12b92ee0491c82a72d1646d14116e187dd965fe6 100644
index d57292e524cad6306c99c1cf6c5790fe1d07d815..298b0dfc67906a96d61b4d40919d3363cede0401 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -866,6 +866,7 @@ public final class CraftServer implements Server {
@ -170,10 +170,10 @@ index f9fd40d33ac72f859a0a7012dbab348fca40c375..12b92ee0491c82a72d1646d14116e187
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index b10873022efc8f01ef172e86cad07831d7bf0d5e..448538cc8a3d16b028a0a6f0f05c9370a02f4259 100644
index a471a3a4191872dae5da7e4f7b41de4491040d5d..655d45b9c664baee77f356d315baacd40209280f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -154,6 +154,14 @@ public class Main {
@@ -156,6 +156,14 @@ public class Main {
.describedAs("Yml file");
// Purpur end
@ -188,7 +188,7 @@ index b10873022efc8f01ef172e86cad07831d7bf0d5e..448538cc8a3d16b028a0a6f0f05c9370
// Paper start
acceptsAll(asList("server-name"), "Name of the server")
.withRequiredArg()
@@ -287,6 +295,7 @@ public class Main {
@@ -289,6 +297,7 @@ public class Main {
}
// Paper end
System.setProperty( "library.jansi.version", "Paper" ); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize inventory API item handling
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index c2802c5bfb5ec82daad32d3a3375f4428ae76dfd..ec40f1933cf3e9da935d6d6def0e3096f7c00028 100644
index 40e5a2fae032445467ac453f1fab7e366e911283..0fa7c1c9b5237b098fc7bde5ac7851f3a8208021 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -273,11 +273,13 @@ public class CraftInventory implements Inventory {
@@ -274,11 +274,13 @@ public class CraftInventory implements Inventory {
}
private int firstPartial(ItemStack item) {
@ -24,7 +24,7 @@ index c2802c5bfb5ec82daad32d3a3375f4428ae76dfd..ec40f1933cf3e9da935d6d6def0e3096
for (int i = 0; i < inventory.length; i++) {
ItemStack cItem = inventory[i];
if (cItem != null && cItem.getAmount() < cItem.getMaxStackSize() && cItem.isSimilar(filteredItem)) {
@@ -295,9 +297,10 @@ public class CraftInventory implements Inventory {
@@ -296,9 +298,10 @@ public class CraftInventory implements Inventory {
/* TODO: some optimization
* - Create a 'firstPartial' with a 'fromIndex'
* - Record the lastPartial per Material
@ -36,7 +36,7 @@ index c2802c5bfb5ec82daad32d3a3375f4428ae76dfd..ec40f1933cf3e9da935d6d6def0e3096
for (int i = 0; i < items.length; i++) {
ItemStack item = items[i];
while (true) {
@@ -307,7 +310,11 @@ public class CraftInventory implements Inventory {
@@ -308,7 +311,11 @@ public class CraftInventory implements Inventory {
// Drat! no partial stack
if (firstPartial == -1) {
// Find a free spot!
@ -49,7 +49,7 @@ index c2802c5bfb5ec82daad32d3a3375f4428ae76dfd..ec40f1933cf3e9da935d6d6def0e3096
if (firstFree == -1) {
// No space at all!
@@ -320,9 +327,11 @@ public class CraftInventory implements Inventory {
@@ -321,9 +328,11 @@ public class CraftInventory implements Inventory {
stack.setAmount(getMaxItemStack());
setItem(firstFree, stack);
item.setAmount(item.getAmount() - getMaxItemStack());

View File

@ -24,16 +24,16 @@ index fe7330fabe386966c2d203a190a00a785ea21be0..a1a585f5b4b2c10c41b184636149c8dd
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 8fc283f014783b76afda83097201bb7938a1f9fa..250aeaba3c29ed35a9318768dc6d95ebc092ac00 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -151,6 +151,11 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java
index 917d147b06b7045ea69917c81f35fcafdd5098dd..5400fcae620912df1dd2c30667cbc4a764252308 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java
@@ -184,6 +184,11 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
}
}
// Paper end
+ // Origami start - seed based feature search doesn't load
+ if (iworldreader instanceof World && ((World) iworldreader).origamiConfig.fastFeatureSearchDontLoad) {
+ if (iworldreader instanceof net.minecraft.world.level.World && ((net.minecraft.world.level.World) iworldreader).origamiConfig.fastFeatureSearchDontLoad) {
+ return chunkcoordintpair.l();
+ }
+ // Origami end

View File

@ -5,11 +5,11 @@ Subject: [PATCH] Remove some streams and object allocations
Partially based on a patch in Spottedleaf's Paper fork
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 7bfb5cb72820c2e42c2fcf889291b04247b09cab..60f184a0ef2f2011b89385a418f10b8300d88892 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -13,9 +13,10 @@ public abstract class ChunkMap extends LightEngineGraph {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index b210921a8176d41224b230809cdcbb4a78750460..029e07a7b860d775fa41c37fe14a84e26173c191 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -16,9 +16,10 @@ public abstract class ChunkMap extends LightEngineGraph {
@Override
protected void a(long i, int j, boolean flag) {
@ -23,7 +23,7 @@ index 7bfb5cb72820c2e42c2fcf889291b04247b09cab..60f184a0ef2f2011b89385a418f10b83
for (int i1 = -1; i1 <= 1; ++i1) {
for (int j1 = -1; j1 <= 1; ++j1) {
@@ -32,9 +33,10 @@ public abstract class ChunkMap extends LightEngineGraph {
@@ -35,9 +36,10 @@ public abstract class ChunkMap extends LightEngineGraph {
@Override
protected int a(long i, long j, int k) {
int l = k;

View File

@ -26,41 +26,29 @@ index a1a585f5b4b2c10c41b184636149c8dde2a3ae51..f02eb8478cef4ffccee83a1ec4ae5ffb
}
\ 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 e0dc2f799634d43023dfb37a70620dc8c20c63aa..115eb270c5b5f19432e30eec41a652939a61dd94 100644
--- a/src/main/java/net/minecraft/server/BlockComposter.java
+++ b/src/main/java/net/minecraft/server/BlockComposter.java
@@ -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);
+ TileEntityHopper.enableTicking(worldserver.getTileEntity(new BlockPosition(blockposition.getX(), blockposition.getY() - 1, blockposition.getZ())), 0); // Origami - don't tick empty hoppers
}
}
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index c25dce9a75b0e79f9b59f31892d863f46e2565e9..7d2c2e6e58741a6da10117c62a809ae47ee341ee 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -139,6 +139,13 @@ public class EntityItem extends Entity {
diff --git a/src/main/java/net/minecraft/world/entity/item/EntityItem.java b/src/main/java/net/minecraft/world/entity/item/EntityItem.java
index 3b84039a76843a0784e2d71bb66dc322450c2cab..15aaff4797f0343b5aba0302a3dc1e5fae459b5d 100644
--- a/src/main/java/net/minecraft/world/entity/item/EntityItem.java
+++ b/src/main/java/net/minecraft/world/entity/item/EntityItem.java
@@ -167,6 +167,13 @@ public class EntityItem extends Entity {
}
}
+ // Origami start - don't tick empty hoppers
+ if (!world.origamiConfig.tickEmptyHoppers && locY() >= 1 && (this.age < 10 || this.age > this.getDespawnRate() - 10
+ || (int) locX() != (int) lastX || (int) locZ() != (int) lastZ || (int) locY() != (int) lastY)) {
+ TileEntityHopper.enableTicking(world.getTileEntity(new BlockPosition(locX(), locY() - 1, locZ())), 0);
+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(world.getTileEntity(new BlockPosition(locX(), locY() - 1, locZ())), 0);
+ }
+ // Origami end
+
if (!this.world.isClientSide && this.age >= this.getDespawnRate()) { // Spigot // Paper
// 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 8e13aebb7043ddfb4b1c02bac46081eb15e906bf..d65044ef409f6a8a05626b655aa88c4e6d434e86 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -138,7 +138,6 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
index 0166d11cb540a536390f486e1069d6119d8d23d6..b688ff6534e069bc631e2cb84bb1deb3e4f1914a 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
@@ -164,7 +164,6 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
if (!itemstack.isEmpty() && itemstack.getCount() > this.getMaxStackSize()) {
itemstack.setCount(this.getMaxStackSize());
}
@ -68,7 +56,7 @@ index 8e13aebb7043ddfb4b1c02bac46081eb15e906bf..d65044ef409f6a8a05626b655aa88c4e
}
@Override
@@ -152,7 +151,25 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@@ -178,7 +177,25 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
}
@Override
@ -88,18 +76,30 @@ index 8e13aebb7043ddfb4b1c02bac46081eb15e906bf..d65044ef409f6a8a05626b655aa88c4e
+
+ private void checkHopperBelow() {
+ if (!world.origamiConfig.tickEmptyHoppers && !this.isEmpty()) {
+ TileEntityHopper.enableTicking(world.getTileEntity(new BlockPosition(locX(), locY() - 1, locZ())), 0);
+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(world.getTileEntity(new net.minecraft.core.BlockPosition(locX(), locY() - 1, locZ())), 0);
+ }
+ }
+ // Origami end
@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..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
diff --git a/src/main/java/net/minecraft/world/level/block/BlockComposter.java b/src/main/java/net/minecraft/world/level/block/BlockComposter.java
index c0b235d5edf3cd14021696d1b4f76ce3de41f5d5..2d6abc0b8b3c9860110f0b5f1df1b3b3bbf30673 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockComposter.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockComposter.java
@@ -302,6 +302,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);
+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(worldserver.getTileEntity(new BlockPosition(blockposition.getX(), blockposition.getY() - 1, blockposition.getZ())), 0); // Origami - don't tick empty hoppers
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
index fb7a1a854efcf42f0351ef521aff67d5fcc4ab27..96dfe05ed57f7e2c3dac3a784ae3445ad9975c40 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
@@ -98,4 +98,14 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento
return new org.bukkit.Location(world.getWorld(), position.getX(), position.getY(), position.getZ());
}
// CraftBukkit end
@ -109,16 +109,16 @@ index 74390aebd353c969353a6efc0904bafe30774d65..b88df070e8e496be43e869b17d312ddf
+ public void update() {
+ super.update();
+ if (world != null && !world.origamiConfig.tickEmptyHoppers) {
+ TileEntityHopper.enableTicking(world.getTileEntity(position.shift(EnumDirection.DOWN)), world.spigotConfig.hopperCheck);
+ TileEntityHopper.enableTicking(world.getTileEntity(position.shift(net.minecraft.core.EnumDirection.DOWN)), world.spigotConfig.hopperCheck);
+ }
+ }
+ // Origami end
}
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed309c099f 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -19,8 +19,9 @@ import org.bukkit.inventory.Inventory;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
index 537dc52e5ff3325555ee6049bc7f277952983b76..a859e12571ceff2199842e03df77b21ee9d689f2 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
@@ -47,8 +47,9 @@ import org.bukkit.inventory.Inventory;
public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable {
private NonNullList<ItemStack> items;
@ -129,7 +129,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
// CraftBukkit start - add fields and methods
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
@@ -98,7 +99,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -126,7 +127,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
if (itemstack.getCount() > this.getMaxStackSize()) {
itemstack.setCount(this.getMaxStackSize());
}
@ -138,7 +138,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
}
@Override
@@ -108,7 +109,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -136,7 +137,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@Override
public void tick() {
@ -147,7 +147,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
--this.j;
this.k = this.world.getTime();
if (!this.m()) {
@@ -117,7 +118,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -145,7 +146,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
boolean result = this.a(() -> {
return a((IHopper) this);
});
@ -156,7 +156,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
this.setCooldown(this.world.spigotConfig.hopperCheck);
}
// Spigot end
@@ -126,6 +127,26 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -154,6 +155,26 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
}
}
@ -183,7 +183,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
private boolean a(Supplier<Boolean> supplier) {
if (this.world != null && !this.world.isClientSide) {
if (!this.m() && (Boolean) this.getBlock().get(BlockHopper.ENABLED)) {
@@ -133,6 +154,10 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -161,6 +182,10 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
if (!this.isEmpty()) {
flag = this.k();
@ -194,7 +194,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
}
if (!this.j()) {
@@ -212,7 +237,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -240,7 +265,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
}
}
if (foundItem && world.paperConfig.cooldownHopperWhenFull) { // Inventory was full - cooldown
@ -203,7 +203,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
}
return false;
}
@@ -252,7 +277,13 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -280,7 +305,13 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
origItemStack.setCount(origCount);
if (world.paperConfig.cooldownHopperWhenFull) {
@ -218,7 +218,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
}
return false;
@@ -460,6 +491,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -488,6 +519,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
entityitem = (EntityItem) iterator.next();
} while (!a((IInventory) ihopper, entityitem));
@ -226,7 +226,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
return true;
}
}
@@ -548,7 +580,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -576,7 +608,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
itemstack = a(iinventory, iinventory1, itemstack, k, enumdirection);
}
}
@ -235,7 +235,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
return itemstack;
}
@@ -689,7 +721,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -717,7 +749,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
return (double) this.position.getZ() + 0.5D;
}
@ -244,7 +244,7 @@ index d432de40eba2767f4ced4d9c642c9d2033acd0ea..271c55d8604680cb995a4dd5d7be56ed
this.j = i;
}
@@ -716,6 +748,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@@ -744,6 +776,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
BlockPosition blockposition = this.getPosition();
if (VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), this.aa_(), OperatorBoolean.AND)) {

View File

@ -21,11 +21,11 @@ index f02eb8478cef4ffccee83a1ec4ae5ffbfb0591c1..047e7d42ce54aa1cb28cfe8b194bf5c6
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/BlockObserver.java b/src/main/java/net/minecraft/server/BlockObserver.java
index 7dfe632523f7fc4426a035b6bf23917b2ea80389..29c3f328f512ffc6c423a5996e1377040f6c4712 100644
--- a/src/main/java/net/minecraft/server/BlockObserver.java
+++ b/src/main/java/net/minecraft/server/BlockObserver.java
@@ -52,7 +52,8 @@ public class BlockObserver extends BlockDirectional {
diff --git a/src/main/java/net/minecraft/world/level/block/BlockObserver.java b/src/main/java/net/minecraft/world/level/block/BlockObserver.java
index 291fd45f6f97c561edaaf8b659920d2c3b6aba46..039fd27455c0b56721caf9ce66975aef71d2caa6 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockObserver.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockObserver.java
@@ -64,7 +64,8 @@ public class BlockObserver extends BlockDirectional {
@Override
public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add timings for Behavior
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
index 96aaaab5b7685c874463505f9d25e8a0a01a6e7c..5bcbf2e5ee02764425802a4113d28d03a2a49dc8 100644
index c5f594d45012016d99b83a778a2b9d20a7c086ac..4ca89e5279f0a60d1a8cca7329ec4d70b6582525 100644
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -140,4 +140,10 @@ public class WorldTimingsHandler {
@ -19,11 +19,11 @@ index 96aaaab5b7685c874463505f9d25e8a0a01a6e7c..5bcbf2e5ee02764425802a4113d28d03
+ }
+ // Origami end
}
diff --git a/src/main/java/net/minecraft/server/Behavior.java b/src/main/java/net/minecraft/server/Behavior.java
index 0b9d469a92decfb0632805791868ef7faa88c535..071ce4d470044b3cdf0ef150623f5366875b7e04 100644
--- a/src/main/java/net/minecraft/server/Behavior.java
+++ b/src/main/java/net/minecraft/server/Behavior.java
@@ -9,6 +9,7 @@ public abstract class Behavior<E extends EntityLiving> {
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
index 717e5f71fb919ac8952a077714d7f4581d546a28..ed3a3593b417131837341784b09cb3f9f76a44be 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
@@ -13,6 +13,7 @@ public abstract class Behavior<E extends EntityLiving> {
protected final Map<MemoryModuleType<?>, MemoryStatus> a;
private Behavior.Status b; public final Behavior.Status getStatus() { return this.b; } // Tuinity - OBFHELPER
private long c;
@ -31,7 +31,7 @@ index 0b9d469a92decfb0632805791868ef7faa88c535..071ce4d470044b3cdf0ef150623f5366
private final int d;
private final int e;
@@ -25,6 +26,10 @@ public abstract class Behavior<E extends EntityLiving> {
@@ -29,6 +30,10 @@ public abstract class Behavior<E extends EntityLiving> {
this.d = i;
this.e = j;
this.a = map;
@ -42,7 +42,7 @@ index 0b9d469a92decfb0632805791868ef7faa88c535..071ce4d470044b3cdf0ef150623f5366
}
public Behavior.Status a() {
@@ -37,7 +42,9 @@ public abstract class Behavior<E extends EntityLiving> {
@@ -41,7 +46,9 @@ public abstract class Behavior<E extends EntityLiving> {
int j = this.d + worldserver.getRandom().nextInt(this.e + 1 - this.d);
this.c = i + (long) j;

View File

@ -4,11 +4,11 @@ Date: Thu, 23 Apr 2020 18:03:57 +0100
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 c5762aebcdd383ab710d4891308a7b1e815c44fd..7535a6689f8e67af97bff9643fabd3c615222f99 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 {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 659ccc8075945531ca714c43a034f2d5baa5defb..76aadee76c482d86a7c6655fc661b926cd36fd33 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1214,9 +1214,12 @@ public abstract class EntityLiving extends Entity {
} else if (damagesource.isFire() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
return false;
} else {
@ -24,7 +24,7 @@ index c5762aebcdd383ab710d4891308a7b1e815c44fd..7535a6689f8e67af97bff9643fabd3c6
this.ticksFarFromPlayer = 0;
float f1 = f;
@@ -1873,6 +1876,11 @@ public abstract class EntityLiving extends Entity {
@@ -1969,6 +1972,11 @@ public abstract class EntityLiving extends Entity {
if (event.isCancelled()) {
return false;
}

View File

@ -20,11 +20,11 @@ index 047e7d42ce54aa1cb28cfe8b194bf5c6c75824ad..27599f422be266ad2fdbda4961766180
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java
index 4c050c841f9846cc74fef51d5eb69f4cbb737ef1..7c426f3b1c65f4e2f4997c8b69c27e8df8f334c0 100644
--- a/src/main/java/net/minecraft/server/EntityPigZombie.java
+++ b/src/main/java/net/minecraft/server/EntityPigZombie.java
@@ -89,7 +89,7 @@ public class EntityPigZombie extends EntityZombie implements IEntityAngerable {
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java b/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java
index 736c45bae020158866514bc760c05a929f47c531..bf72577af3c5631116fbcf086a2c681ea4a4e0a2 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java
@@ -123,7 +123,7 @@ public class EntityPigZombie extends EntityZombie implements IEntityAngerable {
protected void mobTick() {
AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);

View File

@ -46,7 +46,7 @@ index 0a31a5321ac519568db936c94394f71b2e2fcec1..42a77a5f5b8968351a737cb1fd7cebf1
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 878f09d5e587bc4bd70443fbdb89dac29e5a538d..f0c17f1342d9c70cb4fe1fc46dd8b9006037e860 100644
index 58f99e3ebac9a01ebffe4d208e16cbee474d4aa3..314658c7dac1b1fbb440ec85133e6670e52ba684 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,7 +68,7 @@ index 878f09d5e587bc4bd70443fbdb89dac29e5a538d..f0c17f1342d9c70cb4fe1fc46dd8b900
/**
* Represents a stack of items.
@@ -810,4 +822,627 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
@@ -843,4 +855,627 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
return itemMeta != null && itemMeta.hasItemFlag(flag);
}
// Paper end

View File

@ -419,6 +419,50 @@ index 5bb677ce585b856b3d3e589e29786a29619c56a7..613f00fa387dcc5af3191e550dea9d4d
public class CachedSizeConcurrentLinkedQueue<E> extends ConcurrentLinkedQueue<E> {
private final LongAdder cachedSize = new LongAdder();
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
index a0f748957f4472103dd27fc95a711a42de7fae89..c66b49f05be7a9cc26ba595829d7751d38aebeb1 100644
--- a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
@@ -19,6 +19,11 @@ public final class AsyncChatEvent extends AbstractChatEvent {
}
/**
+ * @param async Async
+ * @param player Player
+ * @param recipients Recipients
+ * @param formatter Formatter
+ * @param message Message
* @deprecated use {@link #AsyncChatEvent(boolean, Player, Set, ChatComposer, Component)}
*/
@Deprecated
diff --git a/src/main/java/io/papermc/paper/event/player/ChatEvent.java b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
index 13c5df5fb8ce1d0203d99e88dd691019146a8f52..558d6531e9c06e25369074932fd9f0ab00e9e2c8 100644
--- a/src/main/java/io/papermc/paper/event/player/ChatEvent.java
+++ b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
@@ -24,6 +24,10 @@ public final class ChatEvent extends AbstractChatEvent {
}
/**
+ * @param player Player
+ * @param recipients Recipients
+ * @param formatter Formatter
+ * @param message Message
* @deprecated use {@link #ChatEvent(Player, Set, ChatComposer, Component)}
*/
@Deprecated
diff --git a/src/main/java/io/papermc/paper/inventory/ItemRarity.java b/src/main/java/io/papermc/paper/inventory/ItemRarity.java
index 74ef8395cc040ce488c2acaa416db20272cc2734..b974627a415cd6897b245275e953cc907a5929d8 100644
--- a/src/main/java/io/papermc/paper/inventory/ItemRarity.java
+++ b/src/main/java/io/papermc/paper/inventory/ItemRarity.java
@@ -19,7 +19,7 @@ public enum ItemRarity {
/**
* Gets the color formatting associated with the rarity.
- * @return
+ * @return TextColor
*/
@NotNull
public TextColor getColor() {
diff --git a/src/main/java/io/papermc/paper/world/MoonPhase.java b/src/main/java/io/papermc/paper/world/MoonPhase.java
index df05153397b42930cd53d37b30824c7e5f008f7e..ebf70fea04a9d37aa5f2ad8e7d6cef73cd3a4541 100644
--- a/src/main/java/io/papermc/paper/world/MoonPhase.java
@ -553,7 +597,7 @@ index afb7b136b461202026290624836446cff9f9e45d..087579fdff09237409c9f80446e7a15a
/**
diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java
index 1d93a6c42d6c93ffd50c6054e74f3ff75d745b58..0dc013530b39618a7282a094b0bdb4c024f23712 100644
index e6a83252f42da31ad38f8dc1beccc7aa2c3f54b8..f3b107210473f1707b051c15771ce3bf2a62f171 100644
--- a/src/main/java/org/bukkit/WorldCreator.java
+++ b/src/main/java/org/bukkit/WorldCreator.java
@@ -71,6 +71,8 @@ public class WorldCreator {

View File

@ -0,0 +1,867 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Wed, 17 Mar 2021 15:56:47 -0500
Subject: [PATCH] Conflict on change for adventure deprecations
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 801bef2a060962b5c4f92234401e5bc34a62141a..d754200879bda29d582998433e1a304a6988bbbb 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -303,7 +303,7 @@ public final class Bukkit {
* @return the number of players
* @deprecated in favour of {@link Server#sendMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public static int broadcastMessage(@NotNull String message) {
return server.broadcastMessage(message);
}
@@ -935,7 +935,7 @@ public final class Bukkit {
* @return number of message recipients
* @deprecated in favour of {@link #broadcast(net.kyori.adventure.text.Component, String)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public static int broadcast(@NotNull String message, @NotNull String permission) {
return server.broadcast(message, permission);
}
@@ -1212,7 +1212,7 @@ public final class Bukkit {
*
* @see InventoryType#isCreatable()
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) {
return server.createInventory(owner, type, title);
@@ -1262,7 +1262,7 @@ public final class Bukkit {
* @throws IllegalArgumentException if the size is not a multiple of 9
* @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
public static Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull String title) throws IllegalArgumentException {
return server.createInventory(owner, size, title);
@@ -1289,7 +1289,7 @@ public final class Bukkit {
* @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public static Merchant createMerchant(@Nullable String title) {
return server.createMerchant(title);
}
@@ -1378,7 +1378,7 @@ public final class Bukkit {
* @deprecated in favour of {@link #motd()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public static String getMotd() {
return server.getMotd();
}
@@ -1400,7 +1400,7 @@ public final class Bukkit {
* @deprecated in favour of {@link #shutdownMessage()}
*/
@Nullable
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public static String getShutdownMessage() {
return server.getShutdownMessage();
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 7a3be414ef9d54d7a852ba92d704011fa7f125ac..0a3acc1aa156900aa2a6a5682ffb8c3dc25e7534 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -250,7 +250,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @return the number of players
* @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public int broadcastMessage(@NotNull String message);
// Paper start
@@ -773,7 +773,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @return number of message recipients
* @deprecated in favour of {@link #broadcast(net.kyori.adventure.text.Component, String)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public int broadcast(@NotNull String message, @NotNull String permission);
// Paper start
/**
@@ -1024,7 +1024,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*
* @see InventoryType#isCreatable()
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title);
@@ -1068,7 +1068,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @throws IllegalArgumentException if the size is not a multiple of 9
* @deprecated in favour of {@link #createInventory(InventoryHolder, int, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull String title) throws IllegalArgumentException;
@@ -1091,7 +1091,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
Merchant createMerchant(@Nullable String title);
/**
@@ -1164,7 +1164,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @deprecated in favour of {@link #motd()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
String getMotd();
// Paper start
@@ -1182,7 +1182,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @deprecated in favour of {@link #shutdownMessage()}
*/
@Nullable
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
String getShutdownMessage();
/**
diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java
index 6ea9b54d95d80070c01a612c0ce2ab37f0b4ad41..fe9ec9cb7875df4a40d1c4155e13cca9b3628b30 100644
--- a/src/main/java/org/bukkit/block/Sign.java
+++ b/src/main/java/org/bukkit/block/Sign.java
@@ -48,7 +48,7 @@ public interface Sign extends TileState, Colorable {
* @deprecated in favour of {@link #lines()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String[] getLines();
/**
@@ -62,7 +62,7 @@ public interface Sign extends TileState, Colorable {
* @deprecated in favour of {@link #line(int)}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getLine(int index) throws IndexOutOfBoundsException;
/**
@@ -76,7 +76,7 @@ public interface Sign extends TileState, Colorable {
* @throws IndexOutOfBoundsException If the index is out of the range 0..3
* @deprecated in favour of {@link #line(int, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException;
/**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 2ed61f79fc7a625d00b86ee434d591232518ca3c..c0b75477ab8af71e73b37a66568693a84c5bce74 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -72,7 +72,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @return the friendly name
* @deprecated in favour of {@link #displayName()}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
public String getDisplayName();
@@ -86,7 +86,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param name The new display name.
* @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setDisplayName(@Nullable String name);
// Paper start
@@ -127,7 +127,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @deprecated in favour of {@link #playerListName()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getPlayerListName();
/**
@@ -138,7 +138,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param name new player list name
* @deprecated in favour of {@link #playerListName(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setPlayerListName(@Nullable String name);
/**
@@ -147,7 +147,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @return player list header or null
* @deprecated in favour of {@link #playerListHeader()}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@Nullable
public String getPlayerListHeader();
@@ -157,7 +157,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @return player list header or null
* @deprecated in favour of {@link #playerListFooter()}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@Nullable
public String getPlayerListFooter();
@@ -167,7 +167,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param header player list header, null for empty
* @deprecated in favour of {@link #sendPlayerListHeader(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setPlayerListHeader(@Nullable String header);
/**
@@ -176,7 +176,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param footer player list footer, null for empty
* @deprecated in favour of {@link #sendPlayerListFooter(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setPlayerListFooter(@Nullable String footer);
/**
@@ -187,7 +187,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param footer player list footer, null for empty
* @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
/**
@@ -227,7 +227,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param message kick message
* @deprecated in favour of {@link #kick(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void kickPlayer(@Nullable String message);
// Paper start
@@ -590,7 +590,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
* @deprecated in favour of {@link #sendSignChange(org.bukkit.Location, java.util.List)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
@@ -612,7 +612,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
* @deprecated in favour of {@link #sendSignChange(org.bukkit.Location, java.util.List, org.bukkit.DyeColor)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
/**
@@ -1746,7 +1746,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @deprecated in favour of {@link #locale()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getLocale();
// Paper start
diff --git a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
index 078228106b299a8e38495f7f881d38de4f87bc95..bd5b3142a88c31a676c08fa3e8175f81f4259835 100644
--- a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
+++ b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
@@ -37,7 +37,7 @@ public interface CommandMinecart extends Minecart {
* @param name New name for this CommandMinecart.
* @deprecated in favour of {@link #customName(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setName(@Nullable String name);
}
diff --git a/src/main/java/org/bukkit/event/block/SignChangeEvent.java b/src/main/java/org/bukkit/event/block/SignChangeEvent.java
index 1f79f704abf339150df08900b8ea7da4cefef258..004106913655446774f875015cb79863d21263c8 100644
--- a/src/main/java/org/bukkit/event/block/SignChangeEvent.java
+++ b/src/main/java/org/bukkit/event/block/SignChangeEvent.java
@@ -90,7 +90,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
* @deprecated in favour of {@link #lines()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String[] getLines() {
return adventure$lines.stream().map(org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer()::serialize).toArray(String[]::new); // Paper
}
@@ -106,7 +106,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
* @deprecated in favour of {@link #line(int)}
*/
@Nullable
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getLine(int index) throws IndexOutOfBoundsException {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.adventure$lines.get(index)); // Paper
}
@@ -120,7 +120,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
* or < 0}
* @deprecated in favour of {@link #line(int, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setLine(int index, @Nullable String line) throws IndexOutOfBoundsException {
adventure$lines.set(index, line != null ? org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(line) : null); // Paper
}
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
index 3d45d2e41aad6992b40a22030f2a63baeec78757..3cecfe9f7c253ab474829c612cca2dc05fd5d111 100644
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
@@ -151,7 +151,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
* @param deathMessage Message to appear to other players on the server.
* @deprecated in favour of {@link #deathMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setDeathMessage(@Nullable String deathMessage) {
this.deathMessage = deathMessage;
this.adventure$deathMessage = deathMessage != null ? org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(deathMessage) : net.kyori.adventure.text.Component.empty(); // Paper
@@ -164,7 +164,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
* @deprecated in favour of {@link #deathMessage()}
*/
@Nullable
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getDeathMessage() {
return this.deathMessage != null ? this.deathMessage : (this.adventure$deathMessage != null ? getDeathMessageString(this.adventure$deathMessage) : null); // Paper
}
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 129eac25da4f27489038fb15ab1aeecb172b60cc..670aca11bbaa2d155cd9d2105ac94c9df71d7d8d 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -170,7 +170,7 @@ public enum InventoryType {
}
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getDefaultTitle() {
return title;
}
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
index c9af02b0f62b3d18da1e91d1ea02ce0864fc60b9..5e4ade542c79b87a5174e7affb649d818d546362 100644
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -161,7 +161,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
* @deprecated in favour of {@link #kickMessage()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getKickMessage() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message); // Paper
}
@@ -172,7 +172,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
* @param message New kick message
* @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setKickMessage(@NotNull final String message) {
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper
}
@@ -192,7 +192,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
* @param message Kick message to display to the user
* @deprecated in favour of {@link #disallow(org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void disallow(@NotNull final Result result, @NotNull final String message) {
this.result = result;
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper
diff --git a/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java b/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java
index 851a189d42e271679abc78f95049d8badf7a2b64..7057c2e95267ad32190c5666f20a0566f7fe32fa 100644
--- a/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java
@@ -17,7 +17,7 @@ public class PlayerJoinEvent extends PlayerEvent {
this.joinMessage = joinMessage;
}
- @Deprecated // Paper end
+ @Deprecated // Paper end // Purpur - conflict on change
public PlayerJoinEvent(@NotNull final Player playerJoined, @Nullable final String joinMessage) {
super(playerJoined);
this.joinMessage = joinMessage != null ? org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(joinMessage) : null; // Paper end
@@ -50,7 +50,7 @@ public class PlayerJoinEvent extends PlayerEvent {
* @deprecated in favour of {@link #joinMessage()}
*/
@Nullable
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getJoinMessage() {
return this.joinMessage == null ? null : org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.joinMessage); // Paper
}
@@ -61,7 +61,7 @@ public class PlayerJoinEvent extends PlayerEvent {
* @param joinMessage join message. If null, no message will be sent
* @deprecated in favour of {@link #joinMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setJoinMessage(@Nullable String joinMessage) {
this.joinMessage = joinMessage != null ? org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(joinMessage) : null; // Paper
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
index 5c0efe74237dbe6803ce023fde99682ff70d1a92..253e15eb42cab4f578aa89af1e298177779e5cdc 100644
--- a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
@@ -73,7 +73,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
* @deprecated in favour of {@link #reason()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getReason() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.kickReason); // Paper
}
@@ -85,7 +85,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
* @deprecated in favour of {@link #leaveMessage()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getLeaveMessage() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.leaveMessage); // Paper
}
@@ -106,7 +106,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
* @param kickReason kick reason
* @deprecated in favour of {@link #reason(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setReason(@NotNull String kickReason) {
this.kickReason = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(kickReason); // Paper
}
@@ -117,7 +117,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
* @param leaveMessage leave message
* @deprecated in favour of {@link #leaveMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setLeaveMessage(@NotNull String leaveMessage) {
this.leaveMessage = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(leaveMessage); // Paper
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java b/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java
index 84521186404b8e43c81a2f9513dce2be40d27840..8c65e9e1476d27fc55419290fb53e46dee9b304d 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java
@@ -37,7 +37,7 @@ public class PlayerLocaleChangeEvent extends PlayerEvent {
* @deprecated in favour of {@link #locale()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getLocale() {
return locale;
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index 75cc54739ef841cd90568d74927d6002d4cfa7e0..712900c9afc3b79806d2b564c0734facf969a6fe 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -139,7 +139,7 @@ public class PlayerLoginEvent extends PlayerEvent {
* @deprecated in favour of {@link #kickMessage()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getKickMessage() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message); // Paper
}
@@ -150,7 +150,7 @@ public class PlayerLoginEvent extends PlayerEvent {
* @param message New kick message
* @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setKickMessage(@NotNull final String message) {
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper
}
@@ -181,7 +181,7 @@ public class PlayerLoginEvent extends PlayerEvent {
* @param message Kick message to display to the user
* @deprecated in favour of {@link #disallow(Result, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper start
+ @Deprecated // Paper start // Purpur - conflict on change
public void disallow(@NotNull final Result result, @NotNull final String message) {
this.result = result;
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message);
diff --git a/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java
index 123979ed64939d615b061f91c19c630e1e1db8c7..5b85579964dc6a6150f0c0be650a4bf731414838 100644
--- a/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java
@@ -95,7 +95,7 @@ public class PlayerPreLoginEvent extends Event {
* @return Current kick message
* @deprecated in favour of {@link #kickMessage()}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
public String getKickMessage() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message); // Paper
@@ -107,7 +107,7 @@ public class PlayerPreLoginEvent extends Event {
* @param message New kick message
* @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setKickMessage(@NotNull final String message) {
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper
}
@@ -127,7 +127,7 @@ public class PlayerPreLoginEvent extends Event {
* @param message Kick message to display to the user
* @deprecated in favour of {@link #disallow(org.bukkit.event.player.PlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void disallow(@NotNull final Result result, @NotNull final String message) {
this.result = result;
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper
diff --git a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java
index e43acfb570036adb73d195136573620378cc6a61..1826d11d8b18702ee12c669b50df7f538c324582 100644
--- a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java
@@ -61,7 +61,7 @@ public class PlayerQuitEvent extends PlayerEvent {
* @deprecated in favour of {@link #quitMessage()}
*/
@Nullable
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getQuitMessage() {
return this.quitMessage == null ? null : org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.quitMessage); // Paper
}
@@ -72,7 +72,7 @@ public class PlayerQuitEvent extends PlayerEvent {
* @param quitMessage quit message
* @deprecated in favour of {@link #quitMessage(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setQuitMessage(@Nullable String quitMessage) {
this.quitMessage = quitMessage != null ? org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(quitMessage) : null; // Paper
}
diff --git a/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java b/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java
index 4f8c85222c7bd33217c7db0ff5f47bf397f8f3e5..c18d6d979bd22814ebdc52b995d2cc7ed46dd87f 100644
--- a/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java
+++ b/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java
@@ -73,7 +73,7 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
* @deprecated in favour of {@link #message()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getMessage() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message); // Paper
}
@@ -84,7 +84,7 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
* @param message New message to broadcast
* @deprecated in favour of {@link #message(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setMessage(@NotNull String message) {
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper
}
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
index ede5a41bc071a9c9cea369b227b37a50222f295d..6c6501d73041a6c69e78f34d3bf2a96a7de5f690 100644
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
@@ -109,7 +109,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
* @deprecated in favour of {@link #motd()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getMotd() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.motd); // Paper
}
@@ -120,7 +120,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
* @param motd the message of the day
* @deprecated in favour of {@link #motd(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setMotd(@NotNull String motd) {
this.motd = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(motd); // Paper
}
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
index b06995aa57aa9cba0bb59f1d26d81015619a08e6..5e33fe46ab9bb034acc6a38a3c00c33c8f029ca6 100644
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
@@ -464,7 +464,7 @@ public abstract class InventoryView {
* @return The title.
* @deprecated in favour of {@link #title()}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
public abstract String getTitle();
}
diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
index 1378c8fc2fd187035fc159c8d025d58b5a61f535..2cbeb4ced49cab055e96268077df2ee2e445c980 100644
--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
@@ -234,7 +234,7 @@ public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book {
* @deprecated in favour of {@link #page(int)}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
String getPage(int page);
/**
@@ -250,7 +250,7 @@ public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book {
* @param data the data to set for that page
* @deprecated in favour of {@link #page(int, net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setPage(int page, @NotNull String data);
/**
@@ -260,7 +260,7 @@ public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book {
* @deprecated in favour of {@link #pages()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
List<String> getPages();
/**
@@ -270,7 +270,7 @@ public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book {
* @param pages A list of pages to set the book to use
* @deprecated in favour of {@link #pages(List)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setPages(@NotNull List<String> pages);
/**
@@ -280,7 +280,7 @@ public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book {
* @param pages A list of strings, each being a page
* @deprecated in favour of {@link #pages(net.kyori.adventure.text.Component...)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setPages(@NotNull String... pages);
/**
@@ -290,7 +290,7 @@ public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book {
* @param pages A list of strings, each being a page
* @deprecated in favour of {@link #addPages(net.kyori.adventure.text.Component...)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void addPage(@NotNull String... pages);
/**
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index f093f991f1fedd20fcef041b093398250b7fb286..49d8b1bdad79f452c863f83557ffde7e8f4749c6 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -59,7 +59,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
* @return the display name that is set
* @deprecated in favour of {@link #displayName()}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@NotNull
String getDisplayName();
@@ -83,7 +83,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
* @param name the name to set
* @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setDisplayName(@Nullable String name);
// Paper start
@@ -155,7 +155,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
* @return a list of lore that is set
* @deprecated in favour of {@link #lore()}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
@Nullable
List<String> getLore();
@@ -179,7 +179,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
* @param lore the lore that will be set
* @deprecated in favour of {@link #lore(List)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setLore(@Nullable List<String> lore);
/**
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index ed0bc2024a0bb85837e25f75ae89d1fe257b2e60..f6e831f844e1fe99a2617bd64c2290d1f2e96d81 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -259,7 +259,7 @@ public final class MapCursor {
* @deprecated in favour of {@link #caption()}
*/
@Nullable
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public String getCaption() {
return this.caption == null ? null : org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.caption); // Paper
}
@@ -270,7 +270,7 @@ public final class MapCursor {
* @param caption new caption
* @deprecated in favour of {@link #caption(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
public void setCaption(@Nullable String caption) {
this.caption = caption == null ? null : org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(caption); // Paper
}
diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java
index 58bddb11fd534e7c33a4ffd7b72b055ba92c767a..a1b6b1123808378d58c855cacac391ce97df6f19 100644
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
@@ -47,7 +47,7 @@ public interface Objective {
* @deprecated in favour of {@link #displayName()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
String getDisplayName() throws IllegalStateException;
/**
@@ -60,7 +60,7 @@ public interface Objective {
* characters.
* @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setDisplayName(@NotNull String displayName) throws IllegalStateException, IllegalArgumentException;
/**
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
index f09ff32cc3ffc16af379a378b1948991435393e8..e9db79d10522895e6f119c0cc87eec1cbc45ba6e 100644
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
@@ -89,7 +89,7 @@ public interface Scoreboard {
* @deprecated in favour of {@link #registerNewObjective(String, String, net.kyori.adventure.text.Component)}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName) throws IllegalArgumentException;
/**
@@ -113,7 +113,7 @@ public interface Scoreboard {
* @deprecated in favour of {@link #registerNewObjective(String, String, net.kyori.adventure.text.Component, RenderType)}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
/**
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index f0af10a5b9ad048be197ed5ec6c8ed2672eb3dd5..705b2268b1c227b34852c14601381230dc626a08 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -110,7 +110,7 @@ public interface Team {
* @deprecated in favour of {@link #displayName()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
String getDisplayName() throws IllegalStateException;
/**
@@ -122,7 +122,7 @@ public interface Team {
* @throws IllegalStateException if this team has been unregistered
* @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setDisplayName(@NotNull String displayName) throws IllegalStateException, IllegalArgumentException;
/**
@@ -133,7 +133,7 @@ public interface Team {
* @deprecated in favour of {@link #prefix()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
String getPrefix() throws IllegalStateException;
/**
@@ -146,7 +146,7 @@ public interface Team {
* @throws IllegalStateException if this team has been unregistered
* @deprecated in favour of {@link #prefix(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setPrefix(@NotNull String prefix) throws IllegalStateException, IllegalArgumentException;
/**
@@ -157,7 +157,7 @@ public interface Team {
* @deprecated in favour of {@link #suffix()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
String getSuffix() throws IllegalStateException;
/**
@@ -170,7 +170,7 @@ public interface Team {
* @throws IllegalStateException if this team has been unregistered
* @deprecated in favour of {@link #suffix(net.kyori.adventure.text.Component)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setSuffix(@NotNull String suffix) throws IllegalStateException, IllegalArgumentException;
/**
@@ -184,7 +184,7 @@ public interface Team {
* @deprecated in favour of {@link #color()}
*/
@NotNull
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
ChatColor getColor() throws IllegalStateException;
/**
@@ -197,7 +197,7 @@ public interface Team {
* no color
* @deprecated in favour of {@link #color(net.kyori.adventure.text.format.NamedTextColor)}
*/
- @Deprecated // Paper
+ @Deprecated // Paper // Purpur - conflict on change
void setColor(@NotNull ChatColor color);
/**

View File

@ -5,15 +5,15 @@ Subject: [PATCH] Rebrand
diff --git a/pom.xml b/pom.xml
index e83e4241a56fe131a75fe21cc1518992c089da2c..752d62eb3b87ab24260ec2c029bae0d2b0e3b908 100644
index fc2c3714b6c772d67e258be269aa92dda80cdb12..cf6e53e9f483d21b17e2782816be4403fa5be717 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,8 +27,10 @@
<dependencies>
<dependency>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-api</artifactId>
- <groupId>gg.airplane</groupId>
- <artifactId>airplane-api</artifactId>
+ <!-- Purpur start - our "upstream" is Paper (not Tuinity), so this is necessary for DependencyLoading.kt to work properly -->
+ <groupId>net.pl3x.purpur</groupId>
+ <artifactId>purpur-api</artifactId>
@ -22,7 +22,7 @@ index e83e4241a56fe131a75fe21cc1518992c089da2c..752d62eb3b87ab24260ec2c029bae0d2
<scope>compile</scope>
</dependency>
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
index 74ed02fa9296583977bb721014b10ff8b708b43c..c1280478ee4565003883df9607d4a8a0e8fe4faa 100644
index 89eeb9d202405747409e65fcf226d95379987e29..4d9e685c691a37078ff7452e50ab8c13999dbe10 100644
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
@ -34,11 +34,23 @@ index 74ed02fa9296583977bb721014b10ff8b708b43c..c1280478ee4565003883df9607d4a8a0
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
.completer(new ConsoleCommandCompleter(this.server))
);
diff --git a/src/main/java/gg/airplane/compat/ServerConfigurations.java b/src/main/java/gg/airplane/compat/ServerConfigurations.java
index f4976428bc721319d2926e97cbe0f64c6e9e503c..044ad28bd1fd1c1e25061f9f811fc10baf7f5f72 100644
--- a/src/main/java/gg/airplane/compat/ServerConfigurations.java
+++ b/src/main/java/gg/airplane/compat/ServerConfigurations.java
@@ -23,6 +23,7 @@ public class ServerConfigurations {
"spigot.yml",
"paper.yml",
"tuinity.yml",
+ "purpur.yml", // Purpur
"airplane.air"
};
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index 229c3b0f0c650b501f31147adaa17194af57fedd..f88cf526d272fe47b5a474c0b344b748ee4009fa 100644
index 3bc5cd1e53dd7c94b948e7f57f0dc8e073e349b0..87891161f5b06bb8be0e2016b490484e6daca9d7 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -70,7 +70,7 @@ public class EULA {
@@ -72,7 +72,7 @@ public class EULA {
Properties properties = new Properties();
properties.setProperty("eula", "false");
@ -48,15 +60,15 @@ 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 afc22e545df03a38c801362d308d135df90361e2..a76137268084e048696b7e8d35e00d26f6766df3 100644
index 7cbbc1b1161f26f22a7f7832395af0d4a781cb1a..9301d93ffb5a961cb68a5c37c30b656087c1b45c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1524,7 +1524,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
- return "Tuinity"; // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
+ return "Purpur"; // Purpur // Tuinity // Paper // Spigot // CraftBukkit
- return "Airplane"; // Airplane // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
+ return "Purpur"; // Purpur // Airplane // Tuinity // Paper // Spigot // CraftBukkit
}
public CrashReport b(CrashReport crashreport) {
@ -186,20 +198,20 @@ index 0000000000000000000000000000000000000000..cabfcebf9f944f7a2a2a1cffc7401435
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f994e99ebc8fe22e6f6b45f6379ec410a598789f..eeae4862898f093ca4b9819d0d08fdaf219213a0 100644
index aec6c036ed42078a6cc3540f1f6e46a551e87a2f..f9913d7bd66935f975b756f31e26153ec160b3b1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
- private final String serverName = "Tuinity"; // Paper // Tuinity
+ private final String serverName = "Purpur"; // Paper // Tuinity // Purpur
- private final String serverName = "Airplane"; // Paper // Tuinity // Airplane
+ private final String serverName = "Purpur"; // Paper // Tuinity // Airplane // Purpur
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 57d56ff1b41582f0d249b24165d5b08b02b0f9fe..81cff601a5161c30df90de3cefc18d72cd7ee347 100644
index 712a32c0b64dace1f3e3d6f8acb8cbef1736b1f9..eba28b9c5cb87dea09bf8430d253725f585f87b9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -377,7 +377,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@ -212,15 +224,15 @@ index 57d56ff1b41582f0d249b24165d5b08b02b0f9fe..81cff601a5161c30df90de3cefc18d72
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 001b1e5197eaa51bfff9031aa6c69876c9a47960..13b98439320ac1401a920c01d7cf5a4b3a23deff 100644
index 1788d79ea489e446d3d9f541693d4ba3dfc26015..191f5331f0c7871f80f0da9cc38345ce33353577 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {
public static String getBukkitVersion() {
String result = "Unknown-Version";
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.tuinity/tuinity-api/pom.properties"); // Tuinity
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.pl3x.purpur/purpur-api/pom.properties"); // Tuinity // Purpur
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/gg.airplane/airplane-api/pom.properties"); // Tuinity // Airplane
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.pl3x.purpur/purpur-api/pom.properties"); // Tuinity // Airplane // Purpur
Properties properties = new Properties();
if (stream != null) {

View File

@ -5,14 +5,14 @@ Subject: [PATCH] Purpur config files
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index 52c0ab1ce46e1f3233ef746d9bc699356fa9fae4..4d8740678049aa749b42618470e9cc838555528d 100644
index b480bd3044370b8eb733166f0c4b737344475993..4d8740678049aa749b42618470e9cc838555528d 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -593,7 +593,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
- Metrics metrics = new Metrics("Tuinity", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page
- Metrics metrics = new Metrics("Airplane", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page // Airplane
+ Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Purpur
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
@ -22,7 +22,7 @@ index 52c0ab1ce46e1f3233ef746d9bc699356fa9fae4..4d8740678049aa749b42618470e9cc83
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
- metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() || PaperConfig.isProxyOnlineMode() ? "online" : "offline"));
- metrics.addCustomChart(new Metrics.SimplePie("tuinity_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page
- metrics.addCustomChart(new Metrics.SimplePie("airplane_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page // Airplane
+ metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (PaperConfig.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur
+ metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Purpur
@ -44,11 +44,11 @@ index c56e7fb18f9a56c8025eb70a524f028b5942da37..4b9fdb4f04b333ce32f7fca8f279bf98
try {
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 2644b190813cc934914aeab78fbd6515d1a37c4a..e3721b53db68171665ba05201155d088ae3cb89f 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -173,6 +173,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 24a46ad36613faa5f5a1a12b70f7af886e1608ae..28d47ef97939309ce26b6e4cae14925b510755fd 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -212,6 +212,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return false;
}
com.destroystokyo.paper.PaperConfig.registerCommands();
@ -64,11 +64,11 @@ index 2644b190813cc934914aeab78fbd6515d1a37c4a..e3721b53db68171665ba05201155d088
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
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index bf06ef09cfd4d7618365249d1332d264d8ff1377..ed2192ad7b27eb8fc34be5d7817e1ca4bee5c9d1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -95,6 +95,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 938a8732d1d57ae0cf424fa17c5c5b08cc5df37b..fdcae92b2fe41fa7e3c8d7f23756186e55880315 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -157,6 +157,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
@ -76,14 +76,11 @@ index bf06ef09cfd4d7618365249d1332d264d8ff1377..ed2192ad7b27eb8fc34be5d7817e1ca4
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPosition lastPhysicsProblem; // Spigot
@@ -185,8 +186,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, final DimensionManager dimensionmanager, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
- this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((WorldDataServer)worlddatamutable).getName())); // Purpur
+ this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
@@ -249,6 +250,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName())); // Purpur
this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
@ -290,14 +287,14 @@ index 0000000000000000000000000000000000000000..361f7857e461578e90cb71e15027dada
+}
diff --git a/src/main/java/net/pl3x/purpur/command/PurpurCommand.java b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..4904be939c7a4b1d1583fd7b6232c930b79caba6
index 0000000000000000000000000000000000000000..536955124afaec5c8a070249c7432cb99bf43d67
--- /dev/null
+++ b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
@@ -0,0 +1,65 @@
+package net.pl3x.purpur.command;
+
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.WorldServer;
+import net.minecraft.server.level.WorldServer;
+import net.pl3x.purpur.PurpurConfig;
+import org.bukkit.ChatColor;
+import org.bukkit.Location;
@ -360,7 +357,7 @@ index 0000000000000000000000000000000000000000..4904be939c7a4b1d1583fd7b6232c930
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eeae4862898f093ca4b9819d0d08fdaf219213a0..a64d375e16f033b875ca80e6678c3a3e198d0220 100644
index f9913d7bd66935f975b756f31e26153ec160b3b1..3e0b92259ad00541a8da595a918275c1a5b2bc39 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -865,6 +865,7 @@ public final class CraftServer implements Server {
@ -387,7 +384,7 @@ index eeae4862898f093ca4b9819d0d08fdaf219213a0..a64d375e16f033b875ca80e6678c3a3e
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2357,6 +2360,18 @@ public final class CraftServer implements Server {
@@ -2362,6 +2365,18 @@ public final class CraftServer implements Server {
}
// Tuinity end - add config to timings report
@ -407,10 +404,10 @@ index eeae4862898f093ca4b9819d0d08fdaf219213a0..a64d375e16f033b875ca80e6678c3a3e
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 0f6cb508a170360b6479f9c34048412453fbb89d..a92721dff5c2a9a2a167b36c23d1ef22d2bbd3e1 100644
index 2774abda3dd1390ae904bf2b177bdd0f11968f40..d28088d510a4a40f3948f224a40a63de4645fa42 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -146,6 +146,14 @@ public class Main {
@@ -148,6 +148,14 @@ public class Main {
.describedAs("Yml file");
/* Conctete End - Server Config */

View File

@ -4,43 +4,11 @@ Date: Thu, 23 May 2019 21:50:37 -0500
Subject: [PATCH] Barrels and enderchests 6 rows
diff --git a/src/main/java/net/minecraft/server/BlockEnderChest.java b/src/main/java/net/minecraft/server/BlockEnderChest.java
index 896d99d404419fef5bdf6f9083e07dfc978f4e67..9ab8336df4f1702e9cabefb63f279034fdd57486 100644
--- a/src/main/java/net/minecraft/server/BlockEnderChest.java
+++ b/src/main/java/net/minecraft/server/BlockEnderChest.java
@@ -48,6 +48,27 @@ public class BlockEnderChest extends BlockChestAbstract<TileEntityEnderChest> im
inventoryenderchest.a(tileentityenderchest);
entityhuman.openContainer(new TileInventory((i, playerinventory, entityhuman1) -> {
+ // Purpur start
+ if (net.pl3x.purpur.PurpurConfig.enderChestSixRows) {
+ if (net.pl3x.purpur.PurpurConfig.enderChestPermissionRows) {
+ org.bukkit.craftbukkit.entity.CraftHumanEntity player = entityhuman.getBukkitEntity();
+ if (player.hasPermission("purpur.enderchest.rows.six")) {
+ return new ContainerChest(Containers.GENERIC_9X6, i, playerinventory, inventoryenderchest, 6);
+ } else if (player.hasPermission("purpur.enderchest.rows.five")) {
+ return new ContainerChest(Containers.GENERIC_9X5, i, playerinventory, inventoryenderchest, 5);
+ } else if (player.hasPermission("purpur.enderchest.rows.four")) {
+ return new ContainerChest(Containers.GENERIC_9X4, i, playerinventory, inventoryenderchest, 4);
+ } else if (player.hasPermission("purpur.enderchest.rows.three")) {
+ return new ContainerChest(Containers.GENERIC_9X3, i, playerinventory, inventoryenderchest, 3);
+ } else if (player.hasPermission("purpur.enderchest.rows.two")) {
+ return new ContainerChest(Containers.GENERIC_9X2, i, playerinventory, inventoryenderchest, 2);
+ } else if (player.hasPermission("purpur.enderchest.rows.one")) {
+ return new ContainerChest(Containers.GENERIC_9X1, i, playerinventory, inventoryenderchest, 1);
+ }
+ }
+ return new ContainerChest(Containers.GENERIC_9X6, i, playerinventory, inventoryenderchest, 6);
+ }
+ // Purpur end
return ContainerChest.a(i, playerinventory, inventoryenderchest);
}, 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 8e167a664431b48875a7466be3a440eae089092b..df11848a03d2c08e935624e46489a62bc56de1da 100644
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
@@ -21,11 +21,34 @@ public class InventoryEnderChest extends InventorySubcontainer {
diff --git a/src/main/java/net/minecraft/world/inventory/InventoryEnderChest.java b/src/main/java/net/minecraft/world/inventory/InventoryEnderChest.java
index 85b9eba1dba3de69ab65b0e1c5ebb8740ce6e9e5..97f6ba97a4b2a35c0b8a003e1e27ad38831d859d 100644
--- a/src/main/java/net/minecraft/world/inventory/InventoryEnderChest.java
+++ b/src/main/java/net/minecraft/world/inventory/InventoryEnderChest.java
@@ -28,11 +28,34 @@ public class InventoryEnderChest extends InventorySubcontainer {
}
public InventoryEnderChest(EntityHuman owner) {
@ -76,11 +44,59 @@ index 8e167a664431b48875a7466be3a440eae089092b..df11848a03d2c08e935624e46489a62b
public void a(TileEntityEnderChest tileentityenderchest) {
this.a = tileentityenderchest;
}
diff --git a/src/main/java/net/minecraft/server/TileEntityBarrel.java b/src/main/java/net/minecraft/server/TileEntityBarrel.java
index 31d0b40fb7b30b89be1aa923c54af77e40b90b19..e5703b7d37c5f37c850328e9c8bf186d15934bdb 100644
--- a/src/main/java/net/minecraft/server/TileEntityBarrel.java
+++ b/src/main/java/net/minecraft/server/TileEntityBarrel.java
@@ -49,7 +49,7 @@ public class TileEntityBarrel extends TileEntityLootable {
diff --git a/src/main/java/net/minecraft/world/level/block/BlockEnderChest.java b/src/main/java/net/minecraft/world/level/block/BlockEnderChest.java
index 70d10c492b6ba893d56a463c0e71ac6aa8707f81..34ea9d2aeb9d606d487be796283c9d5ed614a6af 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockEnderChest.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockEnderChest.java
@@ -11,6 +11,7 @@ import net.minecraft.world.TileInventory;
import net.minecraft.world.entity.monster.piglin.PiglinAI;
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.inventory.ContainerChest;
+import net.minecraft.world.inventory.Containers;
import net.minecraft.world.inventory.InventoryEnderChest;
import net.minecraft.world.item.context.BlockActionContext;
import net.minecraft.world.level.GeneratorAccess;
@@ -81,6 +82,27 @@ public class BlockEnderChest extends BlockChestAbstract<TileEntityEnderChest> im
inventoryenderchest.a(tileentityenderchest);
entityhuman.openContainer(new TileInventory((i, playerinventory, entityhuman1) -> {
+ // Purpur start
+ if (net.pl3x.purpur.PurpurConfig.enderChestSixRows) {
+ if (net.pl3x.purpur.PurpurConfig.enderChestPermissionRows) {
+ org.bukkit.craftbukkit.entity.CraftHumanEntity player = entityhuman.getBukkitEntity();
+ if (player.hasPermission("purpur.enderchest.rows.six")) {
+ return new ContainerChest(Containers.GENERIC_9X6, i, playerinventory, inventoryenderchest, 6);
+ } else if (player.hasPermission("purpur.enderchest.rows.five")) {
+ return new ContainerChest(Containers.GENERIC_9X5, i, playerinventory, inventoryenderchest, 5);
+ } else if (player.hasPermission("purpur.enderchest.rows.four")) {
+ return new ContainerChest(Containers.GENERIC_9X4, i, playerinventory, inventoryenderchest, 4);
+ } else if (player.hasPermission("purpur.enderchest.rows.three")) {
+ return new ContainerChest(Containers.GENERIC_9X3, i, playerinventory, inventoryenderchest, 3);
+ } else if (player.hasPermission("purpur.enderchest.rows.two")) {
+ return new ContainerChest(Containers.GENERIC_9X2, i, playerinventory, inventoryenderchest, 2);
+ } else if (player.hasPermission("purpur.enderchest.rows.one")) {
+ return new ContainerChest(Containers.GENERIC_9X1, i, playerinventory, inventoryenderchest, 1);
+ }
+ }
+ return new ContainerChest(Containers.GENERIC_9X6, i, playerinventory, inventoryenderchest, 6);
+ }
+ // Purpur end
return ContainerChest.a(i, playerinventory, inventoryenderchest);
}, BlockEnderChest.e));
entityhuman.a(StatisticList.OPEN_ENDERCHEST);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBarrel.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBarrel.java
index 7a6f150490bc3ef8a5ed43c401fd70bcc67f40f0..449d2c38abdd35b782a6732006eebb381815bcba 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBarrel.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBarrel.java
@@ -14,6 +14,7 @@ import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.entity.player.PlayerInventory;
import net.minecraft.world.inventory.Container;
import net.minecraft.world.inventory.ContainerChest;
+import net.minecraft.world.inventory.Containers;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.BlockBarrel;
import net.minecraft.world.level.block.Blocks;
@@ -68,7 +69,7 @@ public class TileEntityBarrel extends TileEntityLootable {
private TileEntityBarrel(TileEntityTypes<?> tileentitytypes) {
super(tileentitytypes);
@ -89,7 +105,7 @@ index 31d0b40fb7b30b89be1aa923c54af77e40b90b19..e5703b7d37c5f37c850328e9c8bf186d
}
public TileEntityBarrel() {
@@ -78,7 +78,7 @@ public class TileEntityBarrel extends TileEntityLootable {
@@ -97,7 +98,7 @@ public class TileEntityBarrel extends TileEntityLootable {
@Override
public int getSize() {
@ -98,7 +114,7 @@ index 31d0b40fb7b30b89be1aa923c54af77e40b90b19..e5703b7d37c5f37c850328e9c8bf186d
}
@Override
@@ -98,6 +98,7 @@ public class TileEntityBarrel extends TileEntityLootable {
@@ -117,6 +118,7 @@ public class TileEntityBarrel extends TileEntityLootable {
@Override
protected Container createContainer(int i, PlayerInventory playerinventory) {
@ -143,7 +159,7 @@ 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 9c49d9c21630c48ae6783bfc0f9cbe455862d686..613912e014070382d66d1e3a2e805af1bc741966 100644
index 614ab2d73db2293116f2272f6cd5c16da446132d..2885dc250f171917393c0356a005b476b23f9c5f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
@@ -212,8 +212,10 @@ public class CraftContainer extends Container {
@ -159,10 +175,10 @@ index 9c49d9c21630c48ae6783bfc0f9cbe455862d686..613912e014070382d66d1e3a2e805af1
case DISPENSER:
case DROPPER:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index bba9bddc1c0aacade9b7ad56afb1e630caa078fc..c2802c5bfb5ec82daad32d3a3375f4428ae76dfd 100644
index c3fa97ac34e1fc61ae02f224f8afe5a0b486fb4d..40e5a2fae032445467ac453f1fab7e366e911283 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -81,7 +81,7 @@ public class CraftInventory implements Inventory {
@@ -82,7 +82,7 @@ public class CraftInventory implements Inventory {
@Override
public void setContents(ItemStack[] items) {

View File

@ -4,11 +4,11 @@ Date: Fri, 31 May 2019 21:24:33 -0500
Subject: [PATCH] Advancement API
diff --git a/src/main/java/net/minecraft/server/Advancement.java b/src/main/java/net/minecraft/server/Advancement.java
index c405047c00d354bbc1449fd2f917b73f980ef1a5..384d4090f8ff1ea718de16affa5c146a2f58d28a 100644
--- a/src/main/java/net/minecraft/server/Advancement.java
+++ b/src/main/java/net/minecraft/server/Advancement.java
@@ -64,7 +64,7 @@ public class Advancement {
diff --git a/src/main/java/net/minecraft/advancements/Advancement.java b/src/main/java/net/minecraft/advancements/Advancement.java
index e3d5d55a2fe5d86db621d3e0c9322f553386d731..8bfd20ff9a3c96fa9ff5cc618ca7e858e62943a0 100644
--- a/src/main/java/net/minecraft/advancements/Advancement.java
+++ b/src/main/java/net/minecraft/advancements/Advancement.java
@@ -77,7 +77,7 @@ public class Advancement {
}
@Nullable
@ -17,11 +17,11 @@ index c405047c00d354bbc1449fd2f917b73f980ef1a5..384d4090f8ff1ea718de16affa5c146a
return this.display;
}
diff --git a/src/main/java/net/minecraft/server/AdvancementDisplay.java b/src/main/java/net/minecraft/server/AdvancementDisplay.java
index b0d4b7a67679a35fa8f88c241193c0f3814f1e7b..ac4fac89837f4e77dcaec6f9ca90c5aa8a78c4be 100644
--- a/src/main/java/net/minecraft/server/AdvancementDisplay.java
+++ b/src/main/java/net/minecraft/server/AdvancementDisplay.java
@@ -15,10 +15,11 @@ public class AdvancementDisplay {
diff --git a/src/main/java/net/minecraft/advancements/AdvancementDisplay.java b/src/main/java/net/minecraft/advancements/AdvancementDisplay.java
index 721d7fbab447117349994f710338ca616ab11067..35b84373da154a070f691b0049086cc788f7de4d 100644
--- a/src/main/java/net/minecraft/advancements/AdvancementDisplay.java
+++ b/src/main/java/net/minecraft/advancements/AdvancementDisplay.java
@@ -25,10 +25,11 @@ public class AdvancementDisplay {
private final MinecraftKey d;
private final AdvancementFrameType e;
private final boolean f;
@ -35,7 +35,7 @@ index b0d4b7a67679a35fa8f88c241193c0f3814f1e7b..ac4fac89837f4e77dcaec6f9ca90c5aa
public AdvancementDisplay(ItemStack itemstack, IChatBaseComponent ichatbasecomponent, IChatBaseComponent ichatbasecomponent1, @Nullable MinecraftKey minecraftkey, AdvancementFrameType advancementframetype, boolean flag, boolean flag1, boolean flag2) {
this.a = ichatbasecomponent;
@@ -36,22 +37,29 @@ public class AdvancementDisplay {
@@ -46,22 +47,29 @@ public class AdvancementDisplay {
this.j = f1;
}
@ -65,12 +65,13 @@ index b0d4b7a67679a35fa8f88c241193c0f3814f1e7b..ac4fac89837f4e77dcaec6f9ca90c5aa
public boolean j() {
return this.h;
}
diff --git a/src/main/java/net/minecraft/server/AdvancementFrameType.java b/src/main/java/net/minecraft/server/AdvancementFrameType.java
index 90b78e49c0688dc2fb02df0b6784cd82fad4bc07..9a3a53cf3576c299629a84ba76cb5b9b86a14491 100644
--- a/src/main/java/net/minecraft/server/AdvancementFrameType.java
+++ b/src/main/java/net/minecraft/server/AdvancementFrameType.java
@@ -1,15 +1,26 @@
package net.minecraft.server;
diff --git a/src/main/java/net/minecraft/advancements/AdvancementFrameType.java b/src/main/java/net/minecraft/advancements/AdvancementFrameType.java
index f5d24950d317c78a971472821595fc1b44befc6e..f096ecf8d77b085e6c2ef4c3b64f0b65409bb287 100644
--- a/src/main/java/net/minecraft/advancements/AdvancementFrameType.java
+++ b/src/main/java/net/minecraft/advancements/AdvancementFrameType.java
@@ -4,16 +4,27 @@ import net.minecraft.EnumChatFormat;
import net.minecraft.network.chat.ChatMessage;
import net.minecraft.network.chat.IChatBaseComponent;
+import org.bukkit.advancement.FrameType; // Purpur
+
@ -98,11 +99,11 @@ index 90b78e49c0688dc2fb02df0b6784cd82fad4bc07..9a3a53cf3576c299629a84ba76cb5b9b
this.d = s;
this.e = i;
this.f = enumchatformat;
diff --git a/src/main/java/net/minecraft/server/CriterionTrigger.java b/src/main/java/net/minecraft/server/CriterionTrigger.java
index cfb420a9c7e64ec240fff81d2e3fd32f607847b3..6fd3671c37a4fc42aa438a93d5a749b52f618b1e 100644
--- a/src/main/java/net/minecraft/server/CriterionTrigger.java
+++ b/src/main/java/net/minecraft/server/CriterionTrigger.java
@@ -26,6 +26,7 @@ public interface CriterionTrigger<T extends CriterionInstance> {
diff --git a/src/main/java/net/minecraft/advancements/CriterionTrigger.java b/src/main/java/net/minecraft/advancements/CriterionTrigger.java
index f2d74473caf96ca6e871311ef87afa128cd4d0bf..851e69a2f5155d9fa2e5652abdea9aee59e4b20a 100644
--- a/src/main/java/net/minecraft/advancements/CriterionTrigger.java
+++ b/src/main/java/net/minecraft/advancements/CriterionTrigger.java
@@ -29,6 +29,7 @@ public interface CriterionTrigger<T extends CriterionInstance> {
this.c = s;
}
@ -111,7 +112,7 @@ index cfb420a9c7e64ec240fff81d2e3fd32f607847b3..6fd3671c37a4fc42aa438a93d5a749b5
return this.a;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
index a5aadf2850f273e258f84b6c7bc9ca3649fb884d..b0a7092d623adccd61fd3e094f1ec5e8d95c3691 100644
index 77abcd6de43302985cdbb2085abece4f621068d4..c859fc16c263e0c50cb01fc722b6f6723d682481 100644
--- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
+++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
@@ -27,4 +27,11 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement {
@ -128,13 +129,13 @@ index a5aadf2850f273e258f84b6c7bc9ca3649fb884d..b0a7092d623adccd61fd3e094f1ec5e8
}
diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
new file mode 100644
index 0000000000000000000000000000000000000000..1cbb1e67b64a7e830cfabcd1fc07e998434476c3
index 0000000000000000000000000000000000000000..0b4ff544e04ec314e78a7a48b5bf90ee699b2ad6
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
@@ -0,0 +1,47 @@
+package org.bukkit.craftbukkit.advancement;
+
+import net.minecraft.server.AdvancementDisplay;
+import net.minecraft.advancements.AdvancementDisplay;
+import org.bukkit.advancement.FrameType;
+import org.bukkit.craftbukkit.util.CraftChatMessage;
+

View File

@ -4,11 +4,40 @@ Date: Fri, 18 Oct 2019 22:50:12 -0500
Subject: [PATCH] Llama API
diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java
index d9e1b43283bee15c659dd3a99e45d9412aedd0bc..e61f53816cbf09e775762403d97e9c591fb405a6 100644
--- a/src/main/java/net/minecraft/server/EntityLlama.java
+++ b/src/main/java/net/minecraft/server/EntityLlama.java
@@ -13,7 +13,8 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalLlamaFollow.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalLlamaFollow.java
index 4fd1744f13b87c79ae3f46b28a56daeaba343aa6..34a854131dd939693a6df4d52103714ebe373dc3 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalLlamaFollow.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalLlamaFollow.java
@@ -11,7 +11,7 @@ import net.minecraft.world.phys.Vec3D;
public class PathfinderGoalLlamaFollow extends PathfinderGoal {
- public final EntityLlama a;
+ public final EntityLlama a; public EntityLlama getLlama() { return a; } // Purpur
private double b;
private int c;
@@ -23,6 +23,7 @@ public class PathfinderGoalLlamaFollow extends PathfinderGoal {
@Override
public boolean a() {
+ if (!getLlama().shouldJoinCaravan) return false; // Purpur
if (!this.a.isLeashed() && !this.a.fC()) {
List<Entity> list = this.a.world.getEntities(this.a, this.a.getBoundingBox().grow(9.0D, 4.0D, 9.0D), (entity) -> {
EntityTypes<?> entitytypes = entity.getEntityType();
@@ -82,6 +83,7 @@ public class PathfinderGoalLlamaFollow extends PathfinderGoal {
@Override
public boolean b() {
+ if (!getLlama().shouldJoinCaravan) return false; // Purpur
if (this.a.fC() && this.a.fD().isAlive() && this.a(this.a, 0)) {
double d0 = this.a.h((Entity) this.a.fD());
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java
index 2005cb484ba6b5929ad81d3d120521f247f3d4cf..1c6435bf2cd870b795f87368057d8dfc1e1c938a 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java
@@ -63,7 +63,8 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
@Nullable
private EntityLlama bB;
@Nullable
@ -18,7 +47,7 @@ index d9e1b43283bee15c659dd3a99e45d9412aedd0bc..e61f53816cbf09e775762403d97e9c59
public EntityLlama(EntityTypes<? extends EntityLlama> entitytypes, World world) {
super(entitytypes, world);
@@ -42,6 +43,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
@@ -92,6 +93,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
nbttagcompound.set("DecorItem", this.inventoryChest.getItem(1).save(new NBTTagCompound()));
}
@ -26,7 +55,7 @@ index d9e1b43283bee15c659dd3a99e45d9412aedd0bc..e61f53816cbf09e775762403d97e9c59
}
@Override
@@ -53,6 +55,11 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
@@ -103,6 +105,11 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
this.inventoryChest.setItem(1, ItemStack.a(nbttagcompound.getCompound("DecorItem")));
}
@ -38,7 +67,7 @@ index d9e1b43283bee15c659dd3a99e45d9412aedd0bc..e61f53816cbf09e775762403d97e9c59
this.fe();
}
@@ -387,19 +394,24 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
@@ -437,19 +444,24 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
}
}
@ -63,7 +92,7 @@ index d9e1b43283bee15c659dd3a99e45d9412aedd0bc..e61f53816cbf09e775762403d97e9c59
public boolean fB() {
return this.bC != null;
}
@@ -410,7 +422,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
@@ -460,7 +472,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
}
@Nullable
@ -72,37 +101,8 @@ index d9e1b43283bee15c659dd3a99e45d9412aedd0bc..e61f53816cbf09e775762403d97e9c59
return this.bB;
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalLlamaFollow.java b/src/main/java/net/minecraft/server/PathfinderGoalLlamaFollow.java
index 1b29ca2ca0bc5d17673de43bdc854d5b4c96b8b6..47ffa669681da7512ee594ecb643f28576dee444 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalLlamaFollow.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalLlamaFollow.java
@@ -6,7 +6,7 @@ import java.util.List;
public class PathfinderGoalLlamaFollow extends PathfinderGoal {
- public final EntityLlama a;
+ public final EntityLlama a; public EntityLlama getLlama() { return a; } // Purpur
private double b;
private int c;
@@ -18,6 +18,7 @@ public class PathfinderGoalLlamaFollow extends PathfinderGoal {
@Override
public boolean a() {
+ if (!getLlama().shouldJoinCaravan) return false; // Purpur
if (!this.a.isLeashed() && !this.a.fC()) {
List<Entity> list = this.a.world.getEntities(this.a, this.a.getBoundingBox().grow(9.0D, 4.0D, 9.0D), (entity) -> {
EntityTypes<?> entitytypes = entity.getEntityType();
@@ -77,6 +78,7 @@ public class PathfinderGoalLlamaFollow extends PathfinderGoal {
@Override
public boolean b() {
+ if (!getLlama().shouldJoinCaravan) return false; // Purpur
if (this.a.fC() && this.a.fD().isAlive() && this.a(this.a, 0)) {
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 71faa1b38f613db468ee939a7ffac7aaed733d20..43536b0744e5618c10790ae9db399c0506567f2a 100644
index 818034c62893a71808e3af0aa33393605611acdd..71536b6ae6a423e33667efcf584a0020f36fb189 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
@@ -66,4 +66,48 @@ public class CraftLlama extends CraftChestedHorse implements Llama, CraftRangedE

View File

@ -4,31 +4,11 @@ Date: Thu, 8 Aug 2019 15:29:15 -0500
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 f034977f4666385d6e7c7288e453d058c270be01..390aae2733e397ac5c6c457c76bf75f9c8dcd873 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -84,6 +84,15 @@ public abstract class EntityHuman extends EntityLiving {
}
// CraftBukkit end
+ // Purpur start
+ public void setAfk(boolean setAfk){
+ }
+
+ public boolean isAfk() {
+ return false;
+ }
+ // Purpur end
+
public EntityHuman(World world, BlockPosition blockposition, float f, GameProfile gameprofile) {
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 c086579073c785b3b7cd556bbb629b91560bd449..e35fdbf915f627c2b9c9ca6314805006aa495e5f 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1940,8 +1940,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 534c7266fe9d6f60b74a71e5e61ed248e515dffd..f30dcbd26ed56ba8f1a99260722a0b395c220954 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -2070,8 +2070,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void resetIdleTimer() {
this.ca = SystemUtils.getMonotonicMillis();
@ -83,11 +63,117 @@ index c086579073c785b3b7cd556bbb629b91560bd449..e35fdbf915f627c2b9c9ca6314805006
public ServerStatisticManager getStatisticManager() {
return this.serverStatisticManager;
}
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index ad286848ddb7803640ef7eeea46b58473dd1d0c4..2e514b8291a544a88667fbca2389bde4c2ecb109 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
@@ -174,28 +174,18 @@ public interface IEntityAccess {
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index b788c33605fc96d17758cf42e508872e38fb4322..9a99edb041cfd311212c014fd17aed88b232b074 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1000,7 +1000,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit end
if (this.everyoneSleeping && this.players.stream().noneMatch((entityplayer) -> {
- return !entityplayer.isSpectator() && !entityplayer.isDeeplySleeping() && !entityplayer.fauxSleeping; // CraftBukkit
+ return !entityplayer.isSpectator() && !entityplayer.isDeeplySleeping() && !entityplayer.fauxSleeping && !(purpurConfig.idleTimeoutCountAsSleeping && entityplayer.isAfk()); // CraftBukkit // Purpur
})) {
// CraftBukkit start
long l = this.worldData.getDayTime() + 24000L;
@@ -1347,7 +1347,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
while (iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
- if (entityplayer.isSpectator() || (entityplayer.fauxSleeping && !entityplayer.isSleeping())) { // CraftBukkit
+ if (entityplayer.isSpectator() || (entityplayer.fauxSleeping && !entityplayer.isSleeping()) || (purpurConfig.idleTimeoutCountAsSleeping && entityplayer.isAfk())) { // CraftBukkit // Purpur
++i;
} else if (entityplayer.isSleeping()) {
++j;
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index b7e72fe1cd04219391c75beb7d67a1e32e393a16..789cf1652fec8346c1ea3ca47d9ac43c0765528a 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -397,6 +397,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)) {
+ // Purpur start
+ this.player.setAfk(true);
+ if (!this.player.world.purpurConfig.idleTimeoutKick) {
+ return;
+ }
+ // Purpur end
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
this.disconnect(new ChatMessage("multiplayer.disconnect.idling"));
}
@@ -666,6 +672,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
+ if (!to.getWorld().getUID().equals(from.getWorld().getUID()) || to.getBlockX() != from.getBlockX() || to.getBlockY() != from.getBlockY() || to.getBlockZ() != from.getBlockZ() || to.getYaw() != from.getYaw() || to.getPitch() != from.getPitch()) this.player.resetIdleTimer(); // Purpur
+
// Skip the first time we do this
if (true) { // Spigot - don't skip any move events
Location oldTo = to.clone();
@@ -1402,7 +1410,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
- PlayerConnection.LOGGER.warn("{} moved wrongly!", this.player.getDisplayName().getString());
+ PlayerConnection.LOGGER.warn("{} moved wrongly! ({})", this.player.getDisplayName().getString(), d11); // Purpur
}
this.player.setLocation(d4, d5, d6, f, f1);
@@ -1452,6 +1460,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
+ if (!to.getWorld().getUID().equals(from.getWorld().getUID()) || to.getBlockX() != from.getBlockX() || to.getBlockY() != from.getBlockY() || to.getBlockZ() != from.getBlockZ() || to.getYaw() != from.getYaw() || to.getPitch() != from.getPitch()) this.player.resetIdleTimer(); // Purpur
+
// Skip the first time we do this
if (from.getX() != Double.MAX_VALUE) {
Location oldTo = to.clone();
diff --git a/src/main/java/net/minecraft/world/entity/IEntitySelector.java b/src/main/java/net/minecraft/world/entity/IEntitySelector.java
index f5e32faeb6d937cf90b1f3ea251b5cfc91f2338d..f9908fb7cc27a8947030c2100dccf1dc1a4e24f7 100644
--- a/src/main/java/net/minecraft/world/entity/IEntitySelector.java
+++ b/src/main/java/net/minecraft/world/entity/IEntitySelector.java
@@ -15,6 +15,7 @@ import net.minecraft.world.scores.ScoreboardTeamBase;
public final class IEntitySelector {
public static final Predicate<Entity> a = Entity::isAlive;
+ public static Predicate<EntityLiving> isLivingAlive() { return b; } // Purpur - OBFHELPER
public static final Predicate<EntityLiving> b = EntityLiving::isAlive;
public static final Predicate<Entity> c = (entity) -> {
return entity.isAlive() && !entity.isVehicle() && !entity.isPassenger();
@@ -35,6 +36,7 @@ public final class IEntitySelector {
return !entity.isSpectator();
};
public static Predicate<EntityHuman> isInsomniac = (player) -> MathHelper.clamp(((EntityPlayer) player).getStatisticManager().getStatisticValue(StatisticList.CUSTOM.get(StatisticList.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= 72000; // Paper
+ public static Predicate<EntityHuman> notAfk = (player) -> !player.isAfk(); // Purpur
// Paper start
public static final Predicate<Entity> affectsSpawning = (entity) -> {
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
index ad85dda5c50b797904824a08513fbcec042128ea..8f9d0769e7855c3565a34927f3f3741c43e45f35 100644
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
@@ -182,6 +182,15 @@ public abstract class EntityHuman extends EntityLiving {
}
// CraftBukkit end
+ // Purpur start
+ public void setAfk(boolean setAfk){
+ }
+
+ public boolean isAfk() {
+ return false;
+ }
+ // Purpur end
+
public EntityHuman(World world, BlockPosition blockposition, float f, GameProfile gameprofile) {
super(EntityTypes.PLAYER, world);
this.bL = ItemStack.b;
diff --git a/src/main/java/net/minecraft/world/level/IEntityAccess.java b/src/main/java/net/minecraft/world/level/IEntityAccess.java
index a7f2304acf8ee0a15d6eae8c42060e003be13ae7..fd56b2f15e570f266a79c25823a3b3530a693510 100644
--- a/src/main/java/net/minecraft/world/level/IEntityAccess.java
+++ b/src/main/java/net/minecraft/world/level/IEntityAccess.java
@@ -183,28 +183,18 @@ public interface IEntityAccess {
}
// Paper end
@ -128,101 +214,15 @@ index ad286848ddb7803640ef7eeea46b58473dd1d0c4..2e514b8291a544a88667fbca2389bde4
}
@Nullable
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index b5e1a860a2569d7668330827614d221b60f3fc78..5f85a1d513f4fdc21b64e1a2b6882e3325b98ddd 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -7,6 +7,7 @@ import javax.annotation.Nullable;
public final class IEntitySelector {
public static final Predicate<Entity> a = Entity::isAlive;
+ public static Predicate<EntityLiving> isLivingAlive() { return b; } // Purpur - OBFHELPER
public static final Predicate<EntityLiving> b = EntityLiving::isAlive;
public static final Predicate<Entity> c = (entity) -> {
return entity.isAlive() && !entity.isVehicle() && !entity.isPassenger();
@@ -27,6 +28,7 @@ public final class IEntitySelector {
return !entity.isSpectator();
};
public static Predicate<EntityHuman> isInsomniac = (player) -> MathHelper.clamp(((EntityPlayer) player).getStatisticManager().getStatisticValue(StatisticList.CUSTOM.get(StatisticList.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= 72000; // Paper
+ public static Predicate<EntityHuman> notAfk = (player) -> !player.isAfk(); // Purpur
// 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 9146b60cff0aa06e2f6b6003bfe9e2be9d2f0d56..bba8dc8fd10dc34179ca3c8cf471fbb3739fa7b4 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -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)) {
+ // Purpur start
+ this.player.setAfk(true);
+ if (!this.player.world.purpurConfig.idleTimeoutKick) {
+ return;
+ }
+ // Purpur end
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
this.disconnect(new ChatMessage("multiplayer.disconnect.idling"));
}
@@ -521,6 +527,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
+ if (!to.getWorld().getUID().equals(from.getWorld().getUID()) || to.getBlockX() != from.getBlockX() || to.getBlockY() != from.getBlockY() || to.getBlockZ() != from.getBlockZ() || to.getYaw() != from.getYaw() || to.getPitch() != from.getPitch()) this.player.resetIdleTimer(); // Purpur
+
// Skip the first time we do this
if (true) { // Spigot - don't skip any move events
Location oldTo = to.clone();
@@ -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
- PlayerConnection.LOGGER.warn("{} moved wrongly!", this.player.getDisplayName().getString());
+ PlayerConnection.LOGGER.warn("{} moved wrongly! ({})", this.player.getDisplayName().getString(), d11); // Purpur
}
this.player.setLocation(d4, d5, d6, f, f1);
@@ -1307,6 +1315,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
+ if (!to.getWorld().getUID().equals(from.getWorld().getUID()) || to.getBlockX() != from.getBlockX() || to.getBlockY() != from.getBlockY() || to.getBlockZ() != from.getBlockZ() || to.getYaw() != from.getYaw() || to.getPitch() != from.getPitch()) this.player.resetIdleTimer(); // Purpur
+
// Skip the first time we do this
if (from.getX() != Double.MAX_VALUE) {
Location oldTo = to.clone();
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a77fceac7c9e79a6bac05becc21bcb6bf2a1a7c7..be532af2a0de6927a268c631c25f062f370c72ba 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -887,7 +887,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit end
if (this.everyoneSleeping && this.players.stream().noneMatch((entityplayer) -> {
- return !entityplayer.isSpectator() && !entityplayer.isDeeplySleeping() && !entityplayer.fauxSleeping; // CraftBukkit
+ return !entityplayer.isSpectator() && !entityplayer.isDeeplySleeping() && !entityplayer.fauxSleeping && !(purpurConfig.idleTimeoutCountAsSleeping && entityplayer.isAfk()); // CraftBukkit // Purpur
})) {
// CraftBukkit start
long l = this.worldData.getDayTime() + 24000L;
@@ -1231,7 +1231,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
while (iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
- if (entityplayer.isSpectator() || (entityplayer.fauxSleeping && !entityplayer.isSleeping())) { // CraftBukkit
+ if (entityplayer.isSpectator() || (entityplayer.fauxSleeping && !entityplayer.isSleeping()) || (purpurConfig.idleTimeoutCountAsSleeping && entityplayer.isAfk())) { // CraftBukkit // Purpur
++i;
} else if (entityplayer.isSleeping()) {
++j;
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index cb7e34924cb5dbff25d1ffe05cfe5bc22e4a90ed..406e840499e09638e8b325d0e52b764e80acc777 100644
index cb7e34924cb5dbff25d1ffe05cfe5bc22e4a90ed..ee99289165cab9f58b689a7e07aa01622e203863 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -1,6 +1,7 @@
package net.pl3x.purpur;
import com.google.common.base.Throwables;
+import net.minecraft.server.LocaleLanguage;
+import net.minecraft.locale.LocaleLanguage;
import net.minecraft.server.MinecraftServer;
import net.pl3x.purpur.command.PurpurCommand;
import org.bukkit.Bukkit;
@ -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 b3636032fd36efe2e7e546dbebdfd5c1208f9951..abf2a6b9d18f04baa077ededa3562a30dbaa4fe4 100644
index 45e786565ac988abadffda2e7ba3ff1e2880b786..f4052aaa2235894b996d65c569a083f1a09b59a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2482,4 +2482,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2491,4 +2491,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return spigot;
}
// Spigot end
@ -289,10 +289,10 @@ index b3636032fd36efe2e7e546dbebdfd5c1208f9951..abf2a6b9d18f04baa077ededa3562a30
+ // Purpur end
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 18295dceeacefd2586f3e3fe8bd58790740ba14d..f2e978107ef1163ceadb3ea7594eba6e900a8a28 100644
index 6c4c4580faef39e48de5af4db003cf2e3b8a99b5..dc2d880ded328f8377c207ce15f604ec5c25176c 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -206,6 +206,7 @@ public class ActivationRange
@@ -207,6 +207,7 @@ public class ActivationRange
{
player.activatedTick = MinecraftServer.currentTick;

View File

@ -4,11 +4,11 @@ Date: Sun, 26 May 2019 15:19:14 -0500
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 15a4f921b1ae2bbc66b7d58238b60151123a7eb3..fe5937d890762ab37a90f189c4992af389d2c41d 100644
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
@@ -14,6 +14,7 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
index 1fab9b9c7d41a0d2a551096c2c15f741a887fa2d..f33309f4c1ad92960d0634f3f5b8105c284f26a2 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -20,6 +20,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 15a4f921b1ae2bbc66b7d58238b60151123a7eb3..fe5937d890762ab37a90f189c4992af3
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 a64d375e16f033b875ca80e6678c3a3e198d0220..011d0152ca629ea2e0986338e5f55c5d484cc36e 100644
index 3e0b92259ad00541a8da595a918275c1a5b2bc39..f200827a22acc6f6dd454b4c309a5b1e149f9c46 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2520,4 +2520,11 @@ public final class CraftServer implements Server {
@@ -2525,4 +2525,11 @@ public final class CraftServer implements Server {
return mobGoals;
}
// Paper end

View File

@ -5,20 +5,20 @@ 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 a76137268084e048696b7e8d35e00d26f6766df3..27013a6d3cd53778690ee0f45aa0a82994412fa2 100644
index 9301d93ffb5a961cb68a5c37c30b656087c1b45c..2af7c84167f75f1d16d0fd74a4c8156502325446 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1524,7 +1524,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
- return "Purpur"; // Purpur // Tuinity // Paper // Spigot // CraftBukkit
+ return net.pl3x.purpur.PurpurConfig.serverModName; // Purpur // Tuinity // Paper // Spigot // CraftBukkit
- return "Purpur"; // Purpur // Airplane // Tuinity // Paper // Spigot // CraftBukkit
+ return net.pl3x.purpur.PurpurConfig.serverModName; // Purpur // Airplane // Tuinity // Paper // Spigot // CraftBukkit
}
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 406e840499e09638e8b325d0e52b764e80acc777..4627261562a1482aecf4034b8717ecccc2dd9eb0 100644
index ee99289165cab9f58b689a7e07aa01622e203863..5fa51d5cdd55003b94ed41294b6b3b800e79c525 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -139,6 +139,11 @@ public class PurpurConfig {

View File

@ -4,44 +4,19 @@ Date: Sun, 5 May 2019 12:58:45 -0500
Subject: [PATCH] LivingEntity safeFallDistance
diff --git a/src/main/java/net/minecraft/server/EntityGiantZombie.java b/src/main/java/net/minecraft/server/EntityGiantZombie.java
index 702242653a47051c9ed32304c427c27652af6157..9f4f56c47ecd4b35ebf33ca0bf9a040074ababf2 100644
--- a/src/main/java/net/minecraft/server/EntityGiantZombie.java
+++ b/src/main/java/net/minecraft/server/EntityGiantZombie.java
@@ -4,6 +4,7 @@ public class EntityGiantZombie extends EntityMonster {
public EntityGiantZombie(EntityTypes<? extends EntityGiantZombie> entitytypes, World world) {
super(entitytypes, world);
+ this.safeFallDistance = 10.0F; // Purpur
}
@Override
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
index acbdaa097dfd1cba18add0a09ad54ca78d3e0c24..784819d252d94e8040a87f53431fcf2c7a19d1a7 100644
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
@@ -211,7 +211,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
@Override
protected int e(float f, float f1) {
- return MathHelper.f((f * 0.5F - 3.0F) * f1);
+ return MathHelper.f((f * 0.5F - this.safeFallDistance) * f1); // Purpur
}
protected int getChestSlots() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
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 {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 1a7866bed9cb7f0431454d3af4733de05c0cba78..30aabde3d6703eefcb6d57bab43666b97197ba1f 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -228,6 +228,7 @@ public abstract class EntityLiving extends Entity {
// CraftBukkit start
public int expToDrop;
public int maxAirTicks = 300;
+ public float safeFallDistance = 3.0F; // Purpur
boolean forceDrops;
ArrayList<org.bukkit.inventory.ItemStack> drops = new ArrayList<org.bukkit.inventory.ItemStack>();
public boolean forceDrops;
public ArrayList<org.bukkit.inventory.ItemStack> drops = new ArrayList<org.bukkit.inventory.ItemStack>();
public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
@@ -227,8 +228,8 @@ public abstract class EntityLiving extends Entity {
@@ -322,8 +323,8 @@ public abstract class EntityLiving extends Entity {
this.cR();
}
@ -52,7 +27,7 @@ index d568db532de83a85d5c387121cec151c160f36bf..ebe18e5926bb9e7d2dacdb09c213c0ad
if (!iblockdata.isAir()) {
double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
@@ -1693,7 +1694,7 @@ public abstract class EntityLiving extends Entity {
@@ -1790,7 +1791,7 @@ public abstract class EntityLiving extends Entity {
MobEffect mobeffect = this.getEffect(MobEffects.JUMP);
float f2 = mobeffect == null ? 0.0F : (float) (mobeffect.getAmplifier() + 1);
@ -61,11 +36,36 @@ index d568db532de83a85d5c387121cec151c160f36bf..ebe18e5926bb9e7d2dacdb09c213c0ad
}
protected void playBlockStepSound() {
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java b/src/main/java/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java
index 1e41c45af6dbcf097d7d6104e63db637f199301a..cb6e2053d1315b65812e7bff8a17988b5b8ab0e4 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java
@@ -272,7 +272,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
@Override
protected int e(float f, float f1) {
- return MathHelper.f((f * 0.5F - 3.0F) * f1);
+ return MathHelper.f((f * 0.5F - this.safeFallDistance) * f1); // Purpur
}
protected int getChestSlots() {
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java b/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java
index 3b004160da9a2aed440a3ccda538d78f91c61e87..5e6a92dcdbca686d5a8cfc4aaff72b70b81b111f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java
@@ -13,6 +13,7 @@ public class EntityGiantZombie extends EntityMonster {
public EntityGiantZombie(EntityTypes<? extends EntityGiantZombie> entitytypes, World world) {
super(entitytypes, world);
+ this.safeFallDistance = 10.0F; // Purpur
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index c1350bbf62fc5c5e18509f378edf16e8b210cfe8..84aeffac2c2c12d98e9cec05314668a93bb5ed91 100644
index 3d497f69f89455b88fba423de8effb3db83e7af4..b5040de9885556561416bf3282476f3b33925a62 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -833,4 +833,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -843,4 +843,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
getHandle().setHurtDirection(hurtDirection);
}
// Paper end

View File

@ -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 27013a6d3cd53778690ee0f45aa0a82994412fa2..830f3e52b7e5b8604e7c17227476c397912f93c3 100644
index 2af7c84167f75f1d16d0fd74a4c8156502325446..34793bc4bd14dc7a34f32ccfec05cf50eb77cee2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -167,6 +167,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -279,6 +279,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 27013a6d3cd53778690ee0f45aa0a82994412fa2..830f3e52b7e5b8604e7c17227476c397
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -992,6 +993,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1104,6 +1105,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
recentTps[1] = tps5.getAverage();
recentTps[2] = tps15.getAverage();
// Paper end
@ -25,7 +25,7 @@ index 27013a6d3cd53778690ee0f45aa0a82994412fa2..830f3e52b7e5b8604e7c17227476c397
}
// Tuinity - replace logic
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 4627261562a1482aecf4034b8717ecccc2dd9eb0..a34ed978596f1a466b0b48e7db92ac4f1345a996 100644
index 5fa51d5cdd55003b94ed41294b6b3b800e79c525..b54ea480321a3d9153a89e842787b27875e43ef4 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -150,6 +150,11 @@ public class PurpurConfig {
@ -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 011d0152ca629ea2e0986338e5f55c5d484cc36e..ccacd2d84efdc72c3da645f30f8a9b1c2161cf9e 100644
index f200827a22acc6f6dd454b4c309a5b1e149f9c46..b770d3a11fde20dddacd2ea9c317f1f187f76e6d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2526,5 +2526,10 @@ public final class CraftServer implements Server {
@@ -2531,5 +2531,10 @@ public final class CraftServer implements Server {
public String getServerName() {
return getProperties().serverName;
}

View File

@ -4,11 +4,11 @@ Date: Fri, 5 Jul 2019 16:36:55 -0500
Subject: [PATCH] ItemFactory#getMonsterEgg
diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
index a236e0441fc20270b4c44ed5a7d5b94297949226..eeac4aeaf21b43647aa643ec55a1ae842a7ac197 100644
--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
+++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
diff --git a/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java b/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java
index 4d965e504a40eb52777575df839856c825a0900a..addddb64956c63563fc072b35cc511d31c9afd45 100644
--- a/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java
+++ b/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java
@@ -35,7 +35,7 @@ import net.minecraft.world.phys.Vec3D;
public class ItemMonsterEgg extends Item {
@ -18,7 +18,7 @@ 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 c79623339cfe8fb8484bcc2a8c3eb119b9e83093..3a6a1f8ce0a30f2bdc08ec36fe9a2381439e7fa4 100644
index 6966b9d1ce674232d3f867798fa58bd0933ff69e..1cc473eb4d346b1b498a7b170973fb44d8b8aea6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -396,4 +396,18 @@ public final class CraftItemFactory implements ItemFactory {
@ -33,10 +33,10 @@ index c79623339cfe8fb8484bcc2a8c3eb119b9e83093..3a6a1f8ce0a30f2bdc08ec36fe9a2381
+ return null;
+ }
+ String name = type.getKey().toString();
+ net.minecraft.server.MinecraftKey key = new net.minecraft.server.MinecraftKey(name);
+ net.minecraft.server.EntityTypes types = net.minecraft.server.EntityTypes.getFromKey(key);
+ net.minecraft.server.ItemMonsterEgg egg = net.minecraft.server.ItemMonsterEgg.a.get(types);
+ return new net.minecraft.server.ItemStack(egg).asBukkitMirror();
+ net.minecraft.resources.MinecraftKey key = new net.minecraft.resources.MinecraftKey(name);
+ net.minecraft.world.entity.EntityTypes types = net.minecraft.world.entity.EntityTypes.getFromKey(key);
+ net.minecraft.world.item.ItemMonsterEgg egg = net.minecraft.world.item.ItemMonsterEgg.a.get(types);
+ return new net.minecraft.world.item.ItemStack(egg).asBukkitMirror();
+ }
+ // Purpur end
}

View File

@ -4,11 +4,11 @@ Date: Fri, 5 Jul 2019 18:21:00 -0500
Subject: [PATCH] PlayerSetSpawnerTypeWithEggEvent
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
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> {
diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java
index 80c229c1852199fda85c03453d64cae33e413e89..6335e9046a6288f7bcf945ad8c381e080744653d 100644
--- a/src/main/java/net/minecraft/world/entity/EntityTypes.java
+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java
@@ -274,6 +274,16 @@ public class EntityTypes<T extends Entity> {
return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s));
}
@ -25,7 +25,7 @@ index 93b5a6471cde31739d2bd5f2a9fc0e0d974d0eb0..36f572990a0c08f21df6f4dc40c5878b
public static MinecraftKey getName(EntityTypes<?> entitytypes) {
return IRegistry.ENTITY_TYPE.getKey(entitytypes);
}
@@ -301,6 +311,16 @@ public class EntityTypes<T extends Entity> {
@@ -439,6 +449,16 @@ public class EntityTypes<T extends Entity> {
return this.bg;
}
@ -42,7 +42,7 @@ index 93b5a6471cde31739d2bd5f2a9fc0e0d974d0eb0..36f572990a0c08f21df6f4dc40c5878b
public String getDescriptionId() { return f(); } // Paper - OBFHELPER
public String f() {
if (this.bo == null) {
@@ -310,6 +330,7 @@ public class EntityTypes<T extends Entity> {
@@ -448,6 +468,7 @@ public class EntityTypes<T extends Entity> {
return this.bo;
}
@ -50,13 +50,13 @@ index 93b5a6471cde31739d2bd5f2a9fc0e0d974d0eb0..36f572990a0c08f21df6f4dc40c5878b
public IChatBaseComponent g() {
if (this.bp == null) {
this.bp = new ChatMessage(this.f());
diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
index eeac4aeaf21b43647aa643ec55a1ae842a7ac197..d66acf90d0b1bcd5c6481d2a2ee753c7693995b0 100644
--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
+++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
@@ -7,6 +7,13 @@ import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
diff --git a/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java b/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java
index addddb64956c63563fc072b35cc511d31c9afd45..5e2d0246146af8bf1de1038f6a1953451b99f0f5 100644
--- a/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java
+++ b/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java
@@ -33,6 +33,13 @@ import net.minecraft.world.phys.MovingObjectPosition;
import net.minecraft.world.phys.MovingObjectPositionBlock;
import net.minecraft.world.phys.Vec3D;
+// Purpur start
+import net.pl3x.purpur.event.PlayerSetSpawnerTypeWithEggEvent;
@ -68,7 +68,7 @@ index eeac4aeaf21b43647aa643ec55a1ae842a7ac197..d66acf90d0b1bcd5c6481d2a2ee753c7
public class ItemMonsterEgg extends Item {
public static final Map<EntityTypes<?>, ItemMonsterEgg> a = Maps.newIdentityHashMap(); // Purpur - private -> public
@@ -41,6 +48,15 @@ public class ItemMonsterEgg extends Item {
@@ -67,6 +74,15 @@ public class ItemMonsterEgg extends Item {
MobSpawnerAbstract mobspawnerabstract = ((TileEntityMobSpawner) tileentity).getSpawner();
EntityTypes<?> entitytypes = this.a(itemstack.getTag());

View File

@ -4,11 +4,11 @@ Date: Sat, 20 Jul 2013 22:40:56 -0400
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 36f572990a0c08f21df6f4dc40c5878b669ca00c..ed1e0bd379b95bc090c7cdf57de70ec9cc2dac5a 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -187,17 +187,31 @@ public class EntityTypes<T extends Entity> {
diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java
index 6335e9046a6288f7bcf945ad8c381e080744653d..94aca57dd9e08d8841086378a712794e0d9c0e00 100644
--- a/src/main/java/net/minecraft/world/entity/EntityTypes.java
+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java
@@ -318,13 +318,20 @@ 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) {
@ -27,24 +27,23 @@ index 36f572990a0c08f21df6f4dc40c5878b669ca00c..ed1e0bd379b95bc090c7cdf57de70ec9
+ // Purpur end
// CraftBukkit start
- return this.spawnCreature(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
+ return this.spawnCreature(worldserver, itemstack, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // Purpur
+ return this.spawnCreature(worldserver, itemstack, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG, null); // Purpur
}
@Nullable
public T spawnCreature(WorldServer worldserver, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
@@ -349,9 +356,29 @@ public class EntityTypes<T extends Entity> {
}
}
// Paper end
+ // Purpur start
+ return spawnCreature(worldserver, null, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, spawnReason);
+ return spawnCreature(worldserver, null, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, spawnReason, op);
+ }
+
+ @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) {
+ 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, @Nullable java.util.function.Consumer<T> op) {
+ // 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);
if (t0 != null && op != null) op.accept(t0); // Paper
+ // Purpur start
+ if (spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG && itemstack != null && t0 != null) {

View File

@ -4,11 +4,11 @@ Date: Sat, 2 May 2020 20:55:44 -0500
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 e35fdbf915f627c2b9c9ca6314805006aa495e5f..ee1bb58ce2fdaa4cc347476b8f040c346d029cf1 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -154,6 +154,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index f30dcbd26ed56ba8f1a99260722a0b395c220954..7cd1ae92768164b657af9febe9b4feb7fd02f55a 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -284,6 +284,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 e35fdbf915f627c2b9c9ca6314805006aa495e5f..ee1bb58ce2fdaa4cc347476b8f040c34
}
// Paper start
public BlockPosition getPointInFront(double inFront) {
@@ -989,6 +991,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1119,6 +1121,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
@ -30,7 +30,7 @@ index e35fdbf915f627c2b9c9ca6314805006aa495e5f..ee1bb58ce2fdaa4cc347476b8f040c34
@Override
public boolean damageEntity(DamageSource damagesource, float f) {
if (this.isInvulnerable(damagesource)) {
@@ -996,7 +1004,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1126,7 +1134,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 e35fdbf915f627c2b9c9ca6314805006aa495e5f..ee1bb58ce2fdaa4cc347476b8f040c34
return false;
} else {
if (damagesource instanceof EntityDamageSource) {
@@ -1172,6 +1180,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1302,6 +1310,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
// Paper end
@ -47,7 +47,7 @@ index e35fdbf915f627c2b9c9ca6314805006aa495e5f..ee1bb58ce2fdaa4cc347476b8f040c34
return this;
}
}
@@ -2358,9 +2367,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -2488,9 +2497,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public boolean isFrozen() { // Paper - protected > public
@ -66,11 +66,11 @@ index e35fdbf915f627c2b9c9ca6314805006aa495e5f..ee1bb58ce2fdaa4cc347476b8f040c34
@Override
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 bba8dc8fd10dc34179ca3c8cf471fbb3739fa7b4..c586005b34c59710cf398e30924ff3653e0d62fd 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1737,6 +1737,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 789cf1652fec8346c1ea3ca47d9ac43c0765528a..a056adcae8c4c46ede25fdd33aeab616a1af3a76 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1882,6 +1882,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
// Paper start
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packetplayinresourcepackstatus.status.ordinal()];
@ -78,11 +78,11 @@ index bba8dc8fd10dc34179ca3c8cf471fbb3739fa7b4..c586005b34c59710cf398e30924ff365
player.getBukkitEntity().setResourcePackStatus(packStatus);
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 a12e58668e74f2287ddff5bedc00daf2b0a416c1..7f784709ab8c560fd2dae551b6c8c234a2d134c6 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -914,6 +914,8 @@ public abstract class PlayerList {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ac98a3122ee30971b31761f3bc564b41d5ac879f..49acc6e43748a2d2a68f1b134421831b2feedd7b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -998,6 +998,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 abf2a6b9d18f04baa077ededa3562a30dbaa4fe4..8bf29aca4b5aa0d51ed3cda25b37d30e6c986848 100644
index f4052aaa2235894b996d65c569a083f1a09b59a3..1ff48eae5e5b732fbd1e720c55e08a30669bebfa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2498,5 +2498,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2507,5 +2507,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetIdleTimer() {
getHandle().resetIdleTimer();
}

View File

@ -4,11 +4,25 @@ Date: Sun, 19 Apr 2020 00:17:56 -0500
Subject: [PATCH] Anvil API
diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java
index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de39f60e942 100644
--- a/src/main/java/net/minecraft/server/ContainerAnvil.java
+++ b/src/main/java/net/minecraft/server/ContainerAnvil.java
@@ -20,6 +20,8 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
diff --git a/src/main/java/net/minecraft/world/inventory/ContainerAnvil.java b/src/main/java/net/minecraft/world/inventory/ContainerAnvil.java
index ae5674ae9c539720a657838a640050cd3b4dc5b5..1b2d633f3d5d735039f18f27fb1387bd5a74f0d8 100644
--- a/src/main/java/net/minecraft/world/inventory/ContainerAnvil.java
+++ b/src/main/java/net/minecraft/world/inventory/ContainerAnvil.java
@@ -2,8 +2,13 @@ package net.minecraft.world.inventory;
import java.util.Iterator;
import java.util.Map;
+
+import net.minecraft.nbt.NBTTagInt;
import net.minecraft.network.chat.ChatComponentText;
import net.minecraft.network.chat.IChatBaseComponent;
+import net.minecraft.network.protocol.game.PacketPlayOutSetSlot;
+import net.minecraft.network.protocol.game.PacketPlayOutWindowData;
+import net.minecraft.server.level.EntityPlayer;
import net.minecraft.tags.Tag;
import net.minecraft.tags.TagsBlock;
import net.minecraft.world.entity.player.EntityHuman;
@@ -33,6 +38,8 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
public int maximumRepairCost = 40;
private CraftInventoryView bukkitEntity;
// CraftBukkit end
@ -17,7 +31,7 @@ index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de3
public ContainerAnvil(int i, PlayerInventory playerinventory) {
this(i, playerinventory, ContainerAccess.a);
@@ -38,12 +40,14 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@@ -51,12 +58,14 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@Override
protected boolean b(EntityHuman entityhuman, boolean flag) {
@ -33,7 +47,7 @@ index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de3
entityhuman.levelDown(-this.levelCost.get());
}
@@ -94,6 +98,12 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@@ -107,6 +116,12 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@Override
public void e() {
@ -46,7 +60,7 @@ index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de3
ItemStack itemstack = this.repairInventory.getItem(0);
this.levelCost.set(1);
@@ -170,7 +180,7 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@@ -183,7 +198,7 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
int i2 = (Integer) map1.get(enchantment);
i2 = l1 == i2 ? i2 + 1 : Math.max(i2, l1);
@ -55,7 +69,7 @@ index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de3
if (this.player.abilities.canInstantlyBuild || itemstack.getItem() == Items.ENCHANTED_BOOK) {
flag3 = true;
@@ -182,7 +192,7 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@@ -195,7 +210,7 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
Enchantment enchantment1 = (Enchantment) iterator1.next();
if (enchantment1 != enchantment && !enchantment.isCompatible(enchantment1)) {
@ -64,7 +78,7 @@ index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de3
++i;
}
}
@@ -253,6 +263,13 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@@ -266,6 +281,13 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
this.levelCost.set(maximumRepairCost - 1); // CraftBukkit
}
@ -78,7 +92,7 @@ index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de3
if (this.levelCost.get() >= maximumRepairCost && !this.player.abilities.canInstantlyBuild) { // CraftBukkit
itemstack1 = ItemStack.b;
}
@@ -274,6 +291,12 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
@@ -287,6 +309,12 @@ public class ContainerAnvil extends ContainerAnvilAbstract {
org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), itemstack1); // CraftBukkit
this.c();
@ -92,7 +106,7 @@ index fc2038df89f25c07f6f853f6df41fe9b203c3585..4aa6b035a6a8ea39401c6566cd286de3
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java
index 9374c27061280e51bcbae24573eb5d36736c3e4f..d45f356be39cbe271cd2a257b9dac66b88a346fd 100644
index fd59f77d78a97898657919a77405b39ca24cddc9..151c478c6cb19d88000da46b6fbb952e97e58c95 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java
@@ -9,7 +9,7 @@ import org.bukkit.inventory.AnvilInventory;

View File

@ -4,11 +4,11 @@ Date: Tue, 23 Jul 2019 08:28:21 -0500
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 bf9732058c7e55e8f1ed38b3b5e8831e6b21706c..1c87bc91515490e2f8579a5321058845c7d30a56 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -56,6 +56,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
index d8028675fc82883d716bcfb44431ca6ac7dfda36..5539c4cbea46398e92ab6ec56bb9b821e5f01e02 100644
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
@@ -127,6 +127,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
}, MemoryModuleType.MEETING_POINT, (entityvillager, villageplacetype) -> {
return villageplacetype == VillagePlaceType.s;
});
@ -16,7 +16,7 @@ index bf9732058c7e55e8f1ed38b3b5e8831e6b21706c..1c87bc91515490e2f8579a5321058845
public EntityVillager(EntityTypes<? extends EntityVillager> entitytypes, World world) {
this(entitytypes, world, VillagerType.PLAINS);
@@ -68,6 +69,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -139,6 +140,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 bf9732058c7e55e8f1ed38b3b5e8831e6b21706c..1c87bc91515490e2f8579a5321058845
}
@Override
@@ -164,6 +166,10 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -237,6 +239,10 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
protected void mobTick() { mobTick(false); }
protected void mobTick(boolean inactive) {
this.world.getMethodProfiler().enter("villagerBrain");
@ -32,9 +32,9 @@ index bf9732058c7e55e8f1ed38b3b5e8831e6b21706c..1c87bc91515490e2f8579a5321058845
+ boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0;
+ if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick)
+ // Purpur end
if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
this.world.getMethodProfiler().exit();
if (this.bF) {
if (!inactive) {
if (!gg.airplane.AirplaneConfig.dynamicVillagerBehavior || behaviorTick++ % this.activatedPriority == 0) {
this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index c441fcea9b2b5a77b801c8a69541cf42050927dc..c7fb5a737cab0083c39732247acb8f4e87562894 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java

View File

@ -4,11 +4,11 @@ Date: Fri, 11 Oct 2019 00:17:39 -0500
Subject: [PATCH] Alternative Keepalive Handling
diff --git a/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java b/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java
index 8e93f1540ba5f995489c1fbcec70d10b011cd9c3..470f92c4fb0919d052b19acff8dff533724fbcc1 100644
--- a/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java
+++ b/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java
@@ -22,6 +22,7 @@ public class PacketPlayInKeepAlive implements Packet<PacketListenerPlayIn> {
diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayInKeepAlive.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayInKeepAlive.java
index b4c37287362907b8507d156b978ba5b9d961bb7b..9e6e6636539702507abb78515e002819661027af 100644
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayInKeepAlive.java
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayInKeepAlive.java
@@ -24,6 +24,7 @@ public class PacketPlayInKeepAlive implements Packet<PacketListenerPlayIn> {
packetdataserializer.writeLong(this.a);
}
@ -16,11 +16,11 @@ index 8e93f1540ba5f995489c1fbcec70d10b011cd9c3..470f92c4fb0919d052b19acff8dff533
public long b() {
return this.a;
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c586005b34c59710cf398e30924ff3653e0d62fd..be29ecfa00d53ad2067015a5261184b4157c604b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -86,6 +86,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index a056adcae8c4c46ede25fdd33aeab616a1af3a76..68200fe85fc4e66bb58dd35df306ba37604b6b94 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -231,6 +231,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 c586005b34c59710cf398e30924ff3653e0d62fd..be29ecfa00d53ad2067015a5261184b4
// CraftBukkit start - multithreaded fields
private volatile int chatThrottle;
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
@@ -220,6 +221,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -365,6 +366,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
long currentTime = SystemUtils.getMonotonicMillis();
long elapsedTime = currentTime - this.getLastPing();
@ -50,7 +50,7 @@ index c586005b34c59710cf398e30924ff3653e0d62fd..be29ecfa00d53ad2067015a5261184b4
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
@@ -2908,6 +2924,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -3053,6 +3069,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
@ -68,7 +68,7 @@ index c586005b34c59710cf398e30924ff3653e0d62fd..be29ecfa00d53ad2067015a5261184b4
if (this.awaitingKeepAlive && packetplayinkeepalive.b() == this.h) {
int i = (int) (SystemUtils.getMonotonicMillis() - this.lastKeepAlive);
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index a34ed978596f1a466b0b48e7db92ac4f1345a996..9593ac057ef5b79fb54501d7cce1e69e49102918 100644
index b54ea480321a3d9153a89e842787b27875e43ef4..c856e5bd83f0b6582efdad036262511ff89ec49f 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -155,6 +155,11 @@ public class PurpurConfig {

View File

@ -5,23 +5,103 @@ 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
index 71938ad7b3494e803beca7e4022aad12a51f2096..0b77884d8134c328f8fd1bbb8230d260606dc5ee 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 {
@@ -81,6 +81,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
public static final PlainComponentSerializer PLAIN = PlainComponentSerializer.builder().flattener(FLATTENER).build();
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..567a6a064254d99ae6a931b91e6bdd94badb19fc 100644
--- a/src/main/java/net/minecraft/server/BlockMobSpawner.java
+++ b/src/main/java/net/minecraft/server/BlockMobSpawner.java
@@ -1,5 +1,17 @@
package net.minecraft.server;
diff --git a/src/main/java/net/minecraft/server/ItemSpawner.java b/src/main/java/net/minecraft/server/ItemSpawner.java
new file mode 100644
index 0000000000000000000000000000000000000000..599672ed4d0fc412ad3c0fa2e9d9df7035694fa2
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemSpawner.java
@@ -0,0 +1,35 @@
+package net.minecraft.server;
+
+import net.minecraft.core.BlockPosition;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.item.ItemBlock;
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.level.World;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.entity.TileEntity;
+import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
+import net.minecraft.world.level.block.state.IBlockData;
+
+public class ItemSpawner extends ItemBlock {
+ public ItemSpawner(Block block, Info info) {
+ super(block, info);
+ }
+
+ @Override
+ protected boolean a(BlockPosition blockposition, World world, EntityHuman entityhuman, ItemStack itemstack, IBlockData iblockdata) {
+ boolean handled = super.a(blockposition, world, entityhuman, itemstack, iblockdata);
+ if (world.purpurConfig.silkTouchEnabled && entityhuman.getBukkitEntity().hasPermission("purpur.place.spawners")) {
+ TileEntity spawner = world.getTileEntity(blockposition);
+ if (spawner instanceof TileEntityMobSpawner && itemstack.hasTag()) {
+ NBTTagCompound tag = itemstack.getTag();
+ if (tag.hasKey("Purpur.mob_type")) {
+ EntityTypes.getByName(tag.getString("Purpur.mob_type")).ifPresent(type ->
+ ((TileEntityMobSpawner) spawner).getSpawner().setMobName(type));
+ }
+ }
+ }
+ return handled;
+ }
+}
diff --git a/src/main/java/net/minecraft/world/item/Items.java b/src/main/java/net/minecraft/world/item/Items.java
index fc5cc610e7ea584ce72600b9d9f47543265725bb..8e9a25495d76251a86268d3059e2960a86dc46b3 100644
--- a/src/main/java/net/minecraft/world/item/Items.java
+++ b/src/main/java/net/minecraft/world/item/Items.java
@@ -2,6 +2,7 @@ package net.minecraft.world.item;
import net.minecraft.core.IRegistry;
import net.minecraft.resources.MinecraftKey;
+import net.minecraft.server.ItemSpawner;
import net.minecraft.sounds.SoundEffects;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.EnumItemSlot;
@@ -193,7 +194,7 @@ public class Items {
public static final Item ct = a(Blocks.PURPUR_BLOCK, CreativeModeTab.b);
public static final Item cu = a(Blocks.PURPUR_PILLAR, CreativeModeTab.b);
public static final Item cv = a(Blocks.PURPUR_STAIRS, CreativeModeTab.b);
- public static final Item cw = a(Blocks.SPAWNER);
+ public static final Item cw = a(Blocks.SPAWNER, new ItemSpawner(Blocks.SPAWNER, new Item.Info().a(EnumItemRarity.EPIC))); // Purpur
public static final Item cx = a(Blocks.OAK_STAIRS, CreativeModeTab.b);
public static final Item cy = a(Blocks.CHEST, CreativeModeTab.c);
public static final Item cz = a(Blocks.DIAMOND_ORE, CreativeModeTab.b);
diff --git a/src/main/java/net/minecraft/world/level/block/BlockMobSpawner.java b/src/main/java/net/minecraft/world/level/block/BlockMobSpawner.java
index 287dd5f1b2b913df4029966860cd1a426947b187..af3c1a6307fb9e244226794508382d2ffa2aeb4b 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockMobSpawner.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockMobSpawner.java
@@ -1,14 +1,35 @@
package net.minecraft.world.level.block;
import net.minecraft.core.BlockPosition;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.nbt.NBTTagString;
+import net.minecraft.resources.MinecraftKey;
import net.minecraft.server.level.WorldServer;
+import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.enchantment.EnchantmentManager;
+import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.level.IBlockAccess;
+import net.minecraft.world.level.World;
import net.minecraft.world.level.block.entity.TileEntity;
import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
import net.minecraft.world.level.block.state.BlockBase;
import net.minecraft.world.level.block.state.IBlockData;
+// Purpur start
+import io.papermc.paper.adventure.PaperAdventure;
@ -38,7 +118,7 @@ index 81e145ff0759322f74888c81df8d2133fece7144..567a6a064254d99ae6a931b91e6bdd94
public class BlockMobSpawner extends BlockTileEntity {
protected BlockMobSpawner(BlockBase.Info blockbase_info) {
@@ -11,6 +23,59 @@ public class BlockMobSpawner extends BlockTileEntity {
@@ -20,6 +41,59 @@ public class BlockMobSpawner extends BlockTileEntity {
return new TileEntityMobSpawner();
}
@ -98,7 +178,7 @@ index 81e145ff0759322f74888c81df8d2133fece7144..567a6a064254d99ae6a931b91e6bdd94
@Override
public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
super.dropNaturally(iblockdata, worldserver, blockposition, itemstack);
@@ -23,6 +88,7 @@ public class BlockMobSpawner extends BlockTileEntity {
@@ -32,6 +106,7 @@ public class BlockMobSpawner extends BlockTileEntity {
@Override
public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
@ -106,59 +186,17 @@ index 81e145ff0759322f74888c81df8d2133fece7144..567a6a064254d99ae6a931b91e6bdd94
int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
return i;
diff --git a/src/main/java/net/minecraft/server/ItemSpawner.java b/src/main/java/net/minecraft/server/ItemSpawner.java
new file mode 100644
index 0000000000000000000000000000000000000000..5c7f73918542bbdbc8d8f97671f24091fc6cb83b
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemSpawner.java
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+public class ItemSpawner extends ItemBlock {
+ public ItemSpawner(Block block, Info info) {
+ super(block, info);
+ }
+
+ @Override
+ protected boolean a(BlockPosition blockposition, World world, EntityHuman entityhuman, ItemStack itemstack, IBlockData iblockdata) {
+ boolean handled = super.a(blockposition, world, entityhuman, itemstack, iblockdata);
+ if (world.purpurConfig.silkTouchEnabled && entityhuman.getBukkitEntity().hasPermission("purpur.place.spawners")) {
+ TileEntity spawner = world.getTileEntity(blockposition);
+ if (spawner instanceof TileEntityMobSpawner && itemstack.hasTag()) {
+ NBTTagCompound tag = itemstack.getTag();
+ if (tag.hasKey("Purpur.mob_type")) {
+ EntityTypes.getByName(tag.getString("Purpur.mob_type")).ifPresent(type ->
+ ((TileEntityMobSpawner) spawner).getSpawner().setMobName(type));
+ }
+ }
+ }
+ return handled;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Items.java b/src/main/java/net/minecraft/server/Items.java
index 1c861bccc2652057cb154667a5bf7269092b2db4..67ebcbe4daa1ef3cef6ca43ec92befbe4156842e 100644
--- a/src/main/java/net/minecraft/server/Items.java
+++ b/src/main/java/net/minecraft/server/Items.java
@@ -180,7 +180,7 @@ public class Items {
public static final Item ct = a(Blocks.PURPUR_BLOCK, CreativeModeTab.b);
public static final Item cu = a(Blocks.PURPUR_PILLAR, CreativeModeTab.b);
public static final Item cv = a(Blocks.PURPUR_STAIRS, CreativeModeTab.b);
- public static final Item cw = a(Blocks.SPAWNER);
+ public static final Item cw = a(Blocks.SPAWNER, new ItemSpawner(Blocks.SPAWNER, new Item.Info().a(EnumItemRarity.EPIC))); // Purpur
public static final Item cx = a(Blocks.OAK_STAIRS, CreativeModeTab.b);
public static final Item cy = a(Blocks.CHEST, CreativeModeTab.c);
public static final Item cz = a(Blocks.DIAMOND_ORE, CreativeModeTab.b);
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index c7fb5a737cab0083c39732247acb8f4e87562894..ba89efb3159ab04a6239865967f93055cb6be7a9 100644
index c7fb5a737cab0083c39732247acb8f4e87562894..10a6fcd70869719ed2b2d1442a83ab912e00c898 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1,6 +1,12 @@
package net.pl3x.purpur;
+import net.minecraft.server.IRegistry;
+import net.minecraft.server.Item;
+import net.minecraft.server.Items;
+import net.minecraft.server.MinecraftKey;
+import net.minecraft.core.IRegistry;
+import net.minecraft.world.item.Item;
+import net.minecraft.world.item.Items;
+import net.minecraft.resources.MinecraftKey;
import org.bukkit.configuration.ConfigurationSection;
+
+import java.util.ArrayList;

View File

@ -4,11 +4,27 @@ Date: Thu, 6 Jun 2019 22:15:46 -0500
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 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 {
diff --git a/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java b/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java
index 6093d4c7431a286477c9be97163ea8d64168c3b0..04504901b1933ed760b34b8abb994de8ec340a4e 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java
@@ -9,12 +9,15 @@ import net.minecraft.sounds.SoundEffects;
import net.minecraft.tags.Tag;
import net.minecraft.tags.TagsBlock;
import net.minecraft.world.entity.Entity;
+import net.minecraft.world.entity.EntityExperienceOrb;
import net.minecraft.world.entity.EntityLiving;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.ambient.EntityBat;
import net.minecraft.world.entity.animal.EntityTurtle;
+import net.minecraft.world.entity.item.EntityItem;
import net.minecraft.world.entity.monster.EntityZombie;
import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.context.BlockActionContext;
import net.minecraft.world.level.GameRules;
@@ -189,6 +192,23 @@ public class BlockTurtleEgg extends Block {
}
private boolean a(World world, Entity entity) {
@ -34,7 +50,7 @@ index 00c37493c28805558dea06a20973f32ab0359016..0f147dc938cef428452bd3137c68b52a
}
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index ba89efb3159ab04a6239865967f93055cb6be7a9..f403f9dc6cd148b9f9c901f27ce6a77d4225a53f 100644
index 10a6fcd70869719ed2b2d1442a83ab912e00c898..2f18ca7ae23e913155f25fd07627f376e401ab0f 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -104,6 +104,15 @@ public class PurpurWorldConfig {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix vanilla command permission handler
diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
index d9c47f3fc18266df3be1f564c01dfc3e26941380..cf35c9d545582173f81347a656faf1940892716f 100644
index c0fac7369b111e65b896a15848ae22457e5e8914..5278997e522b495b83e53cac5968388d6eca45e4 100644
--- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java
+++ b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
@@ -35,6 +35,7 @@ public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
@ -17,7 +17,7 @@ index d9c47f3fc18266df3be1f564c01dfc3e26941380..cf35c9d545582173f81347a656faf194
public void removeCommand(String name) {
children.remove(name);
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
index f34461460049a80c5ff57805927053a36a4db426..8d89e671eb9081f9198f2b2b2ae0b7bd186c1522 100644
index 5702f18cd39c1e7b5614c28a628108e2204b2ec1..b069ee845b2011b2c669b6c75d0a773f52e06e10 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
@@ -87,6 +87,7 @@ public final class VanillaCommandWrapper extends BukkitCommand {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Logger settings (suppressing pointless logs)
diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
index c680319e4040be2b60795b22a5e65d6444cc67ed..eaa1063ff2bc5621e93043c4de41ca62f1323fde 100644
index 7a8a1960882e291c46301d07da3e1c5415516893..59d781b5e61c5d2c004bc92300d8d42e81821308 100644
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
@@ -170,6 +170,7 @@ public class AdvancementDataPlayer {
@@ -189,6 +189,7 @@ public class AdvancementDataPlayer {
if (advancement == null) {
// CraftBukkit start
if (entry.getKey().getNamespace().equals("minecraft")) {
@ -17,7 +17,7 @@ index c680319e4040be2b60795b22a5e65d6444cc67ed..eaa1063ff2bc5621e93043c4de41ca62
}
// CraftBukkit end
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 9593ac057ef5b79fb54501d7cce1e69e49102918..ec8efc913f8f0bf6ff559a3a5b439a3d24f3a9b6 100644
index c856e5bd83f0b6582efdad036262511ff89ec49f..d3c51f1083c4d4df8e413f47d0636ec829dc37a4 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -178,4 +178,11 @@ public class PurpurConfig {
@ -33,7 +33,7 @@ index 9593ac057ef5b79fb54501d7cce1e69e49102918..ec8efc913f8f0bf6ff559a3a5b439a3d
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
index b14333ce9e6921024bc93c2847b84f1fb40a5508..d25204f7d4af1ddd37005ccbcbe6c03d8eefcf47 100644
index b86604cbf3543b978df000d8f74c6185aa2ae7ec..5df82b0409278bd298e837aa43941247de3f94fe 100644
--- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
@@ -254,6 +254,7 @@ public final class CraftLegacy {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Disable outdated build check
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index a92721dff5c2a9a2a167b36c23d1ef22d2bbd3e1..b10873022efc8f01ef172e86cad07831d7bf0d5e 100644
index d28088d510a4a40f3948f224a40a63de4645fa42..a471a3a4191872dae5da7e4f7b41de4491040d5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -259,7 +259,7 @@ public class Main {
@@ -261,7 +261,7 @@ public class Main {
System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper
}

View File

@ -4,11 +4,11 @@ Date: Sun, 12 May 2019 00:43:12 -0500
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 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
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index c6b4af810fe3bda7797ab94316b2357178c9cd49..b7c72eaf5715a30bb8f82891f9830f9f62ec03c9 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -228,7 +228,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
public double D;
public double E;
public double F;
@ -17,11 +17,94 @@ index 2ec48858be8eb2c522c9685b43bd36b3b581cf8b..7cafc89e048e43f339f5289f38674b18
public boolean noclip;
public float I;
protected final Random random;
diff --git a/src/main/java/net/minecraft/server/EntityGiantZombie.java b/src/main/java/net/minecraft/server/EntityGiantZombie.java
index 9f4f56c47ecd4b35ebf33ca0bf9a040074ababf2..565c938d879940d8e12fe320ea8524d2cf679c1f 100644
--- a/src/main/java/net/minecraft/server/EntityGiantZombie.java
+++ b/src/main/java/net/minecraft/server/EntityGiantZombie.java
@@ -4,9 +4,66 @@ public class EntityGiantZombie extends EntityMonster {
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index f4440a5c4aedb1d7d303517f86a07c856dd1309b..7443fe924486404931c11793acc67e2f03de4e41 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -1020,6 +1020,7 @@ public abstract class EntityInsentient extends EntityLiving {
return f;
}
+ protected void setEquipmentBasedOnDifficulty(DifficultyDamageScaler difficultydamagescaler) { a(difficultydamagescaler); } // Purpur - OBFHELPER
protected void a(DifficultyDamageScaler difficultydamagescaler) {
if (this.random.nextFloat() < 0.15F * difficultydamagescaler.d()) {
int i = this.random.nextInt(2);
@@ -1127,6 +1128,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
}
+ protected void setEnchantmentBasedOnDifficulty(DifficultyDamageScaler difficultydamagescaler) { b(difficultydamagescaler); } // Purpur - OBFHELPER
protected void b(DifficultyDamageScaler difficultydamagescaler) {
float f = difficultydamagescaler.d();
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 30aabde3d6703eefcb6d57bab43666b97197ba1f..ffc5ca763a22a1c4d06ffdb72c30482c13ec0a7b 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -261,6 +261,7 @@ public abstract class EntityLiving extends Entity {
this.activeItem = ItemStack.b;
this.by = Optional.empty();
this.attributeMap = new AttributeMapBase(AttributeDefaults.a(entitytypes));
+ this.initAttributes(); // Purpur
this.craftAttributes = new CraftAttributeMap(attributeMap); // CraftBukkit
// CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor
this.datawatcher.set(EntityLiving.HEALTH, (float) this.getAttributeInstance(GenericAttributes.MAX_HEALTH).getValue());
@@ -276,6 +277,8 @@ public abstract class EntityLiving extends Entity {
this.bg = this.a(new Dynamic(dynamicopsnbt, dynamicopsnbt.createMap((Map) ImmutableMap.of(dynamicopsnbt.createString("memories"), dynamicopsnbt.emptyMap()))));
}
+ protected void initAttributes() {} // Purpur
+
public BehaviorController<?> getBehaviorController() {
return this.bg;
}
@@ -2276,7 +2279,7 @@ public abstract class EntityLiving extends Entity {
this.enderTeleportTo(vec3d.x, vec3d.y, vec3d.z);
}
- protected float dJ() {
+ protected float dJ() { return getJumpHeight(); } public float getJumpHeight() { // Purpur - OBFHELPER
return 0.42F * this.getBlockJumpFactor();
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java b/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java
index 5e6a92dcdbca686d5a8cfc4aaff72b70b81b111f..a188a89143cb1b0243dacdec33c446ca4120219f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityGiantZombie.java
@@ -1,21 +1,99 @@
package net.minecraft.world.entity.monster;
import net.minecraft.core.BlockPosition;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.DifficultyDamageScaler;
+import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.entity.EntityPose;
import net.minecraft.world.entity.EntitySize;
import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.world.entity.EnumItemSlot;
+import net.minecraft.world.entity.EnumMobSpawn;
+import net.minecraft.world.entity.GroupDataEntity;
import net.minecraft.world.entity.ai.attributes.AttributeProvider;
import net.minecraft.world.entity.ai.attributes.GenericAttributes;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalLookAtPlayer;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalMeleeAttack;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalMoveTowardsRestriction;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomLookaround;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomStrollLand;
+import net.minecraft.world.entity.ai.goal.target.PathfinderGoalHurtByTarget;
+import net.minecraft.world.entity.ai.goal.target.PathfinderGoalNearestAttackableTarget;
+import net.minecraft.world.entity.animal.EntityIronGolem;
+import net.minecraft.world.entity.animal.EntityTurtle;
+import net.minecraft.world.entity.npc.EntityVillager;
+import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.Items;
import net.minecraft.world.level.IWorldReader;
import net.minecraft.world.level.World;
+import net.minecraft.world.level.WorldAccess;
public class EntityGiantZombie extends EntityMonster {
public EntityGiantZombie(EntityTypes<? extends EntityGiantZombie> entitytypes, World world) {
super(entitytypes, world);
@ -89,7 +172,7 @@ index 9f4f56c47ecd4b35ebf33ca0bf9a040074ababf2..565c938d879940d8e12fe320ea8524d2
@Override
protected float b(EntityPose entitypose, EntitySize entitysize) {
return 10.440001F;
@@ -18,6 +75,6 @@ public class EntityGiantZombie extends EntityMonster {
@@ -27,6 +105,6 @@ public class EntityGiantZombie extends EntityMonster {
@Override
public float a(BlockPosition blockposition, IWorldReader iworldreader) {
@ -97,58 +180,8 @@ index 9f4f56c47ecd4b35ebf33ca0bf9a040074ababf2..565c938d879940d8e12fe320ea8524d2
+ return super.a(blockposition, iworldreader); // Purpur - fix light requirements for natural spawns
}
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index a47217c020d2c2a3caddafa0549dc827373798dd..07908edcaffb5ee1be8a71f3f0affb91c7e6e51b 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -950,6 +950,7 @@ public abstract class EntityInsentient extends EntityLiving {
return f;
}
+ protected void setEquipmentBasedOnDifficulty(DifficultyDamageScaler difficultydamagescaler) { a(difficultydamagescaler); } // Purpur - OBFHELPER
protected void a(DifficultyDamageScaler difficultydamagescaler) {
if (this.random.nextFloat() < 0.15F * difficultydamagescaler.d()) {
int i = this.random.nextInt(2);
@@ -1057,6 +1058,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
}
+ protected void setEnchantmentBasedOnDifficulty(DifficultyDamageScaler difficultydamagescaler) { b(difficultydamagescaler); } // Purpur - OBFHELPER
protected void b(DifficultyDamageScaler difficultydamagescaler) {
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 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 {
this.activeItem = ItemStack.b;
this.by = Optional.empty();
this.attributeMap = new AttributeMapBase(AttributeDefaults.a(entitytypes));
+ this.initAttributes(); // Purpur
this.craftAttributes = new CraftAttributeMap(attributeMap); // CraftBukkit
// CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor
this.datawatcher.set(EntityLiving.HEALTH, (float) this.getAttributeInstance(GenericAttributes.MAX_HEALTH).getValue());
@@ -181,6 +182,8 @@ public abstract class EntityLiving extends Entity {
this.bg = this.a(new Dynamic(dynamicopsnbt, dynamicopsnbt.createMap((Map) ImmutableMap.of(dynamicopsnbt.createString("memories"), dynamicopsnbt.emptyMap()))));
}
+ protected void initAttributes() {} // Purpur
+
public BehaviorController<?> getBehaviorController() {
return this.bg;
}
@@ -2179,7 +2182,7 @@ public abstract class EntityLiving extends Entity {
this.enderTeleportTo(vec3d.x, vec3d.y, vec3d.z);
}
- protected float dJ() {
+ protected float dJ() { return getJumpHeight(); } public float getJumpHeight() { // Purpur - OBFHELPER
return 0.42F * this.getBlockJumpFactor();
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index f403f9dc6cd148b9f9c901f27ce6a77d4225a53f..3207b8b6166bd28796cb9c199c3ab466f7c0a02e 100644
index 2f18ca7ae23e913155f25fd07627f376e401ab0f..1c87c929aaae17631100d1aa30b3e7ecce52686f 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -113,6 +113,28 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Fri, 5 Jul 2019 11:09:25 -0500
Subject: [PATCH] Illusioners AI settings
diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java
index 50442b3a498d1bab4270e69952a79f5182153ece..c57bf5091430709778dc21d70c8a32819c9d6639 100644
--- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java
+++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java
@@ -19,6 +19,15 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
index fee9a5140f097225b5da58b18bfbd528dffdc77b..cb092bee9d6827d4b0276bfa9b033cf7ca86ead4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
@@ -56,6 +56,15 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan
}
@ -25,7 +25,7 @@ index 50442b3a498d1bab4270e69952a79f5182153ece..c57bf5091430709778dc21d70c8a3281
protected void initPathfinder() {
super.initPathfinder();
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 3207b8b6166bd28796cb9c199c3ab466f7c0a02e..5c716a6b4f9ff33912ebb274b36eef70679ea87b 100644
index 1c87c929aaae17631100d1aa30b3e7ecce52686f..d6bd971a62af7341f8dc8b3afe32786ced6fcd41 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -135,6 +135,20 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,19 @@ Date: Sun, 7 Jul 2019 19:52:16 -0500
Subject: [PATCH] Zombie horse naturally spawn
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index be532af2a0de6927a268c631c25f062f370c72ba..4f0159cd0b7a438084a3fc9cf681dbce6e41a125 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1104,12 +1104,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 9a99edb041cfd311212c014fd17aed88b232b074..9d4ceaebf43b349454f10abfb5bb995d084c11fb 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -96,6 +96,7 @@ import net.minecraft.world.entity.ai.village.poi.VillagePlace;
import net.minecraft.world.entity.ai.village.poi.VillagePlaceType;
import net.minecraft.world.entity.animal.EntityAnimal;
import net.minecraft.world.entity.animal.EntityWaterAnimal;
+import net.minecraft.world.entity.animal.horse.EntityHorseAbstract;
import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton;
import net.minecraft.world.entity.boss.EntityComplexPart;
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
@@ -1220,12 +1221,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {
boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper
if (flag1) {
@ -34,7 +42,7 @@ index be532af2a0de6927a268c631c25f062f370c72ba..4f0159cd0b7a438084a3fc9cf681dbce
EntityLightning entitylightning = (EntityLightning) EntityTypes.LIGHTNING_BOLT.a((World) this);
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 5c716a6b4f9ff33912ebb274b36eef70679ea87b..04dfb820053925c2835bdcec702d5a467a9fe48e 100644
index d6bd971a62af7341f8dc8b3afe32786ced6fcd41..81b0e17a4bc5022ea757f03c2546808148d6e957 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -155,4 +155,9 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,36 @@ Date: Fri, 29 Nov 2019 22:37:44 -0600
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 b2f028422d9a7a84e49e383b78032feb887a85c0..ff80ac7db73b7c7dd6ac62ac128af1cab961d075 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -24,6 +24,17 @@ public class EntityCreeper extends EntityMonster {
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
index 9c8abb18c0ed850939b6691396f5d551e13c7af9..1986f6a672b97c1f0366bdb76e185815b8ca3bd6 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
@@ -9,6 +9,7 @@ import net.minecraft.network.syncher.DataWatcherRegistry;
import net.minecraft.server.level.WorldServer;
import net.minecraft.sounds.SoundEffect;
import net.minecraft.sounds.SoundEffects;
+import net.minecraft.world.DifficultyDamageScaler;
import net.minecraft.world.EnumHand;
import net.minecraft.world.EnumInteractionResult;
import net.minecraft.world.damagesource.DamageSource;
@@ -17,6 +18,8 @@ import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityAreaEffectCloud;
import net.minecraft.world.entity.EntityLightning;
import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.world.entity.EnumMobSpawn;
+import net.minecraft.world.entity.GroupDataEntity;
import net.minecraft.world.entity.ai.attributes.AttributeProvider;
import net.minecraft.world.entity.ai.attributes.GenericAttributes;
import net.minecraft.world.entity.ai.goal.PathfinderGoalAvoidTarget;
@@ -39,6 +42,7 @@ import net.minecraft.world.level.IMaterial;
import net.minecraft.world.level.World;
// CraftBukkit start
+import net.minecraft.world.level.WorldAccess;
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent;
@@ -59,6 +63,17 @@ public class EntityCreeper extends EntityMonster {
super(entitytypes, world);
}
@ -27,7 +52,7 @@ index b2f028422d9a7a84e49e383b78032feb887a85c0..ff80ac7db73b7c7dd6ac62ac128af1ca
protected void initPathfinder() {
this.goalSelector.a(1, new PathfinderGoalFloat(this));
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 04dfb820053925c2835bdcec702d5a467a9fe48e..5b8961a061c4a877cfa856f6d9f6d77060060829 100644
index 81b0e17a4bc5022ea757f03c2546808148d6e957..638ee71a78d9e75de6ddd7f0aec67a023bb8c06a 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -113,6 +113,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Sat, 31 Aug 2019 17:47:11 -0500
Subject: [PATCH] Rabbit naturally spawn toast and killer
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
index 80a4a71753a1fd9f62e75f0b4ea9307ed7072c4f..f17608730fca96af4f9779863a8c25723a3bd5cf 100644
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
@@ -297,6 +297,10 @@ public class EntityRabbit extends EntityAnimal {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java
index dcbb07fb6ab799d4526a2da0614c193c7abba715..180fc927074dc683ad4d482a00dd4e04ff7923d0 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java
@@ -352,6 +352,10 @@ public class EntityRabbit extends EntityAnimal {
if (!this.hasCustomName()) {
this.setCustomName(new ChatMessage(SystemUtils.a("entity", EntityRabbit.bp)));
}
@ -19,7 +19,7 @@ index 80a4a71753a1fd9f62e75f0b4ea9307ed7072c4f..f17608730fca96af4f9779863a8c2572
}
this.datawatcher.set(EntityRabbit.bo, i);
@@ -318,6 +322,16 @@ public class EntityRabbit extends EntityAnimal {
@@ -373,6 +377,16 @@ public class EntityRabbit extends EntityAnimal {
}
private int a(GeneratorAccess generatoraccess) {
@ -37,7 +37,7 @@ index 80a4a71753a1fd9f62e75f0b4ea9307ed7072c4f..f17608730fca96af4f9779863a8c2572
int i = this.random.nextInt(100);
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 5b8961a061c4a877cfa856f6d9f6d77060060829..f51f60110dd6117979b9d9b230065ad21135824c 100644
index 638ee71a78d9e75de6ddd7f0aec67a023bb8c06a..6dcfbebd850d71587da5a78a3acf09d8ae413072 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -154,6 +154,13 @@ public class PurpurWorldConfig {

View File

@ -5,11 +5,11 @@ Subject: [PATCH] Fix 'outdated server' showing in ping before server fully
boots
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
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 {
diff --git a/src/main/java/net/minecraft/server/network/PacketStatusListener.java b/src/main/java/net/minecraft/server/network/PacketStatusListener.java
index e1997563984540e6edf5d3b697d029dc5f3c40e1..847c91305d23b99e612b9e5f988df14d3fb84a8c 100644
--- a/src/main/java/net/minecraft/server/network/PacketStatusListener.java
+++ b/src/main/java/net/minecraft/server/network/PacketStatusListener.java
@@ -146,6 +146,7 @@ public class PacketStatusListener implements PacketStatusInListener {
this.networkManager.sendPacket(new PacketStatusOutServerInfo(ping));
*/

View File

@ -4,11 +4,19 @@ Date: Sat, 15 Jun 2019 03:12:15 -0500
Subject: [PATCH] Make Iron Golems Swim
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
index 0a5c27e732540e03c87e6da0fbdc6e3c2e382810..bdff2368836dca230a6622a205d5772834afc6ee 100644
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
@@ -24,6 +24,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java b/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java
index 5e2b49d120b724cb5a7ae00940ded4f4875ea8a1..62cff5faafa076d05ebc59ad5c4fb020bea0509e 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java
@@ -30,6 +30,7 @@ import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.IEntityAngerable;
import net.minecraft.world.entity.ai.attributes.AttributeProvider;
import net.minecraft.world.entity.ai.attributes.GenericAttributes;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat;
import net.minecraft.world.entity.ai.goal.PathfinderGoalLookAtPlayer;
import net.minecraft.world.entity.ai.goal.PathfinderGoalMeleeAttack;
import net.minecraft.world.entity.ai.goal.PathfinderGoalMoveTowardsTarget;
@@ -70,6 +71,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable {
@Override
protected void initPathfinder() {
@ -17,7 +25,7 @@ index 0a5c27e732540e03c87e6da0fbdc6e3c2e382810..bdff2368836dca230a6622a205d57728
this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F));
this.goalSelector.a(2, new PathfinderGoalStrollVillage(this, 0.6D, false));
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index f51f60110dd6117979b9d9b230065ad21135824c..3ec33a96396e49d1ddb9f7eea804e4ae8080efbd 100644
index 6dcfbebd850d71587da5a78a3acf09d8ae413072..decd0e755deede2b092866a8f7f6b46520435bbe 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -154,6 +154,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,32 @@ Date: Sat, 6 Jul 2019 17:00:04 -0500
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 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 {
diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutEntity.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutEntity.java
index 0eed10a6c4e0c7245f219d19ed1e2e5c94364db9..2b54a5f3347f788b751892105f888663bb349629 100644
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutEntity.java
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutEntity.java
@@ -9,11 +9,11 @@ import net.minecraft.world.phys.Vec3D;
public class PacketPlayOutEntity implements Packet<PacketListenerPlayOut> {
protected int a;
- protected short b;
- protected short c;
- protected short d;
- protected byte e;
- protected byte f;
+ protected short b; public short getX() { return b; } // Purpur - OBFHELPER
+ protected short c; public short getY() { return c; } // Purpur - OBFHELPER
+ protected short d; public short getZ() { return d; } // Purpur - OBFHELPER
+ protected byte e; public byte getYaw() { return e; } // Purpur - OBFHELPER
+ protected byte f; public byte getPitch() { return f; } // Purpur - OBFHELPER
protected boolean g;
protected boolean h;
protected boolean i;
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
index c830b257054b7f8153aa9225c1f61f49a6ea0a84..3a66a34db2b8ac612431131cea80e57ee72de05f 100644
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
@@ -209,6 +209,7 @@ public class EntityTrackerEntry {
this.o = 0;
packet1 = new PacketPlayOutEntityTeleport(this.tracker);
}
@ -16,7 +37,7 @@ index 2402c18e6a18221a43bea9fc68278da9d19eede4..e51b6bd0698593867e6821326d223770
}
if ((this.e || this.tracker.impulse || this.tracker instanceof EntityLiving && ((EntityLiving) this.tracker).isGliding()) && this.tickCounter > 0) {
@@ -258,6 +259,22 @@ public class EntityTrackerEntry {
@@ -302,6 +303,22 @@ public class EntityTrackerEntry {
}
@ -39,29 +60,8 @@ index 2402c18e6a18221a43bea9fc68278da9d19eede4..e51b6bd0698593867e6821326d223770
public void a(EntityPlayer entityplayer) {
this.tracker.c(entityplayer);
entityplayer.c(this.tracker);
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutEntity.java b/src/main/java/net/minecraft/server/PacketPlayOutEntity.java
index 8e48407fd405ac4c3eece7762b8155c5d0f00fa0..91c4e658230bb8bbce9d0f56db0768a7c09f0095 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutEntity.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutEntity.java
@@ -5,11 +5,11 @@ import java.io.IOException;
public class PacketPlayOutEntity implements Packet<PacketListenerPlayOut> {
protected int a;
- protected short b;
- protected short c;
- protected short d;
- protected byte e;
- protected byte f;
+ protected short b; public short getX() { return b; } // Purpur - OBFHELPER
+ protected short c; public short getY() { return c; } // Purpur - OBFHELPER
+ protected short d; public short getZ() { return d; } // Purpur - OBFHELPER
+ protected byte e; public byte getYaw() { return e; } // Purpur - OBFHELPER
+ protected byte f; public byte getPitch() { return f; } // Purpur - OBFHELPER
protected boolean g;
protected boolean h;
protected boolean i;
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index ec8efc913f8f0bf6ff559a3a5b439a3d24f3a9b6..a2f3c5c81d93814f89a778c8c58d36b416ea1efc 100644
index d3c51f1083c4d4df8e413f47d0636ec829dc37a4..d12749a8084ede08d8efa80db279511f3c84b044 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -179,6 +179,11 @@ public class PurpurConfig {

View File

@ -4,11 +4,20 @@ Date: Sat, 13 Jul 2019 15:56:22 -0500
Subject: [PATCH] Tulips change fox type
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index 56c119e8d11c5ffb1f90ac4249bce434b3e78884..8845afd83d47902d5192ec1a9146b6f20c5667d3 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -37,9 +37,9 @@ public class EntityFox extends EntityAnimal {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
index a3b714a9d63c6bb33a2731fb9293c9d155754b17..cea46348c0876e168376061fbaf258048e9358cb 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
@@ -30,6 +30,8 @@ import net.minecraft.tags.Tag;
import net.minecraft.tags.TagsFluid;
import net.minecraft.util.MathHelper;
import net.minecraft.world.DifficultyDamageScaler;
+import net.minecraft.world.EnumHand;
+import net.minecraft.world.EnumInteractionResult;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityAgeable;
@@ -107,9 +109,9 @@ public class EntityFox extends EntityAnimal {
private static final Predicate<Entity> bv = (entity) -> {
return !entity.bx() && IEntitySelector.e.test(entity);
};
@ -21,7 +30,7 @@ index 56c119e8d11c5ffb1f90ac4249bce434b3e78884..8845afd83d47902d5192ec1a9146b6f2
private float bz;
private float bA;
private float bB;
@@ -227,6 +227,11 @@ public class EntityFox extends EntityAnimal {
@@ -297,6 +299,11 @@ public class EntityFox extends EntityAnimal {
}
private void initializePathFinderGoals() {
@ -33,7 +42,7 @@ index 56c119e8d11c5ffb1f90ac4249bce434b3e78884..8845afd83d47902d5192ec1a9146b6f2
if (this.getFoxType() == EntityFox.Type.RED) {
this.targetSelector.a(4, this.bw);
this.targetSelector.a(4, this.bx);
@@ -259,6 +264,7 @@ public class EntityFox extends EntityAnimal {
@@ -329,6 +336,7 @@ public class EntityFox extends EntityAnimal {
public void setFoxType(EntityFox.Type entityfox_type) {
this.datawatcher.set(EntityFox.bo, entityfox_type.b());
@ -41,7 +50,7 @@ index 56c119e8d11c5ffb1f90ac4249bce434b3e78884..8845afd83d47902d5192ec1a9146b6f2
}
private List<UUID> fa() {
@@ -576,6 +582,27 @@ public class EntityFox extends EntityAnimal {
@@ -646,6 +654,27 @@ public class EntityFox extends EntityAnimal {
return this.fa().contains(uuid);
}
@ -69,11 +78,11 @@ index 56c119e8d11c5ffb1f90ac4249bce434b3e78884..8845afd83d47902d5192ec1a9146b6f2
@Override
protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND).cloneItemStack(); // Paper
diff --git a/src/main/java/net/minecraft/server/Items.java b/src/main/java/net/minecraft/server/Items.java
index 67ebcbe4daa1ef3cef6ca43ec92befbe4156842e..4c379916d8d7797038d2980761c49f44c010dea8 100644
--- a/src/main/java/net/minecraft/server/Items.java
+++ b/src/main/java/net/minecraft/server/Items.java
@@ -119,8 +119,8 @@ public class Items {
diff --git a/src/main/java/net/minecraft/world/item/Items.java b/src/main/java/net/minecraft/world/item/Items.java
index 8e9a25495d76251a86268d3059e2960a86dc46b3..993a88a5937417016821ef9d7cd58e4ee097491c 100644
--- a/src/main/java/net/minecraft/world/item/Items.java
+++ b/src/main/java/net/minecraft/world/item/Items.java
@@ -133,8 +133,8 @@ public class Items {
public static final Item bk = a(Blocks.ALLIUM, CreativeModeTab.c);
public static final Item bl = a(Blocks.AZURE_BLUET, CreativeModeTab.c);
public static final Item bm = a(Blocks.RED_TULIP, CreativeModeTab.c);
@ -85,7 +94,7 @@ index 67ebcbe4daa1ef3cef6ca43ec92befbe4156842e..4c379916d8d7797038d2980761c49f44
public static final Item bq = a(Blocks.OXEYE_DAISY, CreativeModeTab.c);
public static final Item br = a(Blocks.CORNFLOWER, CreativeModeTab.c);
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 3ec33a96396e49d1ddb9f7eea804e4ae8080efbd..459ff8ffe7c0bf09fe93d89b3433bc930bb52f06 100644
index decd0e755deede2b092866a8f7f6b46520435bbe..081675005077c5070f7745e24fd2ee7400fe2320 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -118,6 +118,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,33 @@ Date: Thu, 26 Mar 2020 19:46:44 -0500
Subject: [PATCH] Breedable Polar Bears
diff --git a/src/main/java/net/minecraft/server/EntityPolarBear.java b/src/main/java/net/minecraft/server/EntityPolarBear.java
index 914c6e48d60ac8feadc08e52e050899fe1396a8d..99f0bd8f82520778d469ec51745034e6ebd3238a 100644
--- a/src/main/java/net/minecraft/server/EntityPolarBear.java
+++ b/src/main/java/net/minecraft/server/EntityPolarBear.java
@@ -23,6 +23,30 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java
index 49f26d487229a732902d5bf48d305b0864e90d63..f25f5ced218555af0d62844a78842cfc7599d608 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java
@@ -34,6 +34,7 @@ import net.minecraft.world.entity.GroupDataEntity;
import net.minecraft.world.entity.IEntityAngerable;
import net.minecraft.world.entity.ai.attributes.AttributeProvider;
import net.minecraft.world.entity.ai.attributes.GenericAttributes;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalBreed;
import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat;
import net.minecraft.world.entity.ai.goal.PathfinderGoalFollowParent;
import net.minecraft.world.entity.ai.goal.PathfinderGoalLookAtPlayer;
@@ -41,11 +42,13 @@ import net.minecraft.world.entity.ai.goal.PathfinderGoalMeleeAttack;
import net.minecraft.world.entity.ai.goal.PathfinderGoalPanic;
import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomLookaround;
import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomStroll;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalTempt;
import net.minecraft.world.entity.ai.goal.target.PathfinderGoalHurtByTarget;
import net.minecraft.world.entity.ai.goal.target.PathfinderGoalNearestAttackableTarget;
import net.minecraft.world.entity.ai.goal.target.PathfinderGoalUniversalAngerReset;
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.crafting.RecipeItemStack;
import net.minecraft.world.level.GeneratorAccess;
import net.minecraft.world.level.World;
import net.minecraft.world.level.WorldAccess;
@@ -68,6 +71,30 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
super(entitytypes, world);
}
@ -39,7 +61,7 @@ index 914c6e48d60ac8feadc08e52e050899fe1396a8d..99f0bd8f82520778d469ec51745034e6
@Override
public EntityAgeable createChild(WorldServer worldserver, EntityAgeable entityageable) {
return (EntityAgeable) EntityTypes.POLAR_BEAR.a((World) worldserver);
@@ -30,7 +54,7 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
@@ -75,7 +102,7 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
@Override
public boolean k(ItemStack itemstack) {
@ -48,7 +70,7 @@ index 914c6e48d60ac8feadc08e52e050899fe1396a8d..99f0bd8f82520778d469ec51745034e6
}
@Override
@@ -39,6 +63,12 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
@@ -84,6 +111,12 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new EntityPolarBear.c());
this.goalSelector.a(1, new EntityPolarBear.d());
@ -61,7 +83,7 @@ index 914c6e48d60ac8feadc08e52e050899fe1396a8d..99f0bd8f82520778d469ec51745034e6
this.goalSelector.a(4, new PathfinderGoalFollowParent(this, 1.25D));
this.goalSelector.a(5, new PathfinderGoalRandomStroll(this, 1.0D));
this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
@@ -180,10 +210,12 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
@@ -225,10 +258,12 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
return flag;
}
@ -75,7 +97,7 @@ index 914c6e48d60ac8feadc08e52e050899fe1396a8d..99f0bd8f82520778d469ec51745034e6
this.datawatcher.set(EntityPolarBear.bo, flag);
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 459ff8ffe7c0bf09fe93d89b3433bc930bb52f06..09b66b9ca3185528d0bc5f0a1d811c5a42039339 100644
index 081675005077c5070f7745e24fd2ee7400fe2320..fa43c015976aabaae8843983976c9c939a49016f 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -164,6 +164,14 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,24 @@ Date: Sun, 12 Apr 2020 13:19:34 -0500
Subject: [PATCH] Chickens can retaliate
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java
index 182469fd39cb23633a3225cf1a64ab6b291e4cdf..8fb5d5c75e79a81ab46af3fbb96ebc41804113c4 100644
--- a/src/main/java/net/minecraft/server/EntityChicken.java
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
@@ -17,16 +17,33 @@ public class EntityChicken extends EntityAnimal {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityChicken.java b/src/main/java/net/minecraft/world/entity/animal/EntityChicken.java
index cd6fb8efb20a2d32de59d479b1dbf5ee69d5df37..600d6ebdf554dbaa8ca46a22a12d8b4e3255d987 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityChicken.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityChicken.java
@@ -20,10 +20,12 @@ import net.minecraft.world.entity.ai.goal.PathfinderGoalBreed;
import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat;
import net.minecraft.world.entity.ai.goal.PathfinderGoalFollowParent;
import net.minecraft.world.entity.ai.goal.PathfinderGoalLookAtPlayer;
+import net.minecraft.world.entity.ai.goal.PathfinderGoalMeleeAttack;
import net.minecraft.world.entity.ai.goal.PathfinderGoalPanic;
import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomLookaround;
import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomStrollLand;
import net.minecraft.world.entity.ai.goal.PathfinderGoalTempt;
+import net.minecraft.world.entity.ai.goal.target.PathfinderGoalHurtByTarget;
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
@@ -51,16 +53,33 @@ public class EntityChicken extends EntityAnimal {
this.a(PathType.WATER, 0.0F);
}
@ -43,7 +56,7 @@ index 182469fd39cb23633a3225cf1a64ab6b291e4cdf..8fb5d5c75e79a81ab46af3fbb96ebc41
}
@Override
@@ -35,7 +52,7 @@ public class EntityChicken extends EntityAnimal {
@@ -69,7 +88,7 @@ public class EntityChicken extends EntityAnimal {
}
public static AttributeProvider.Builder eK() {
@ -53,7 +66,7 @@ index 182469fd39cb23633a3225cf1a64ab6b291e4cdf..8fb5d5c75e79a81ab46af3fbb96ebc41
@Override
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 09b66b9ca3185528d0bc5f0a1d811c5a42039339..c2a13de7f0cafc8c93c5255e0f65f5e8ad439c7a 100644
index fa43c015976aabaae8843983976c9c939a49016f..78218f2d59203b8f2b286fd09b3f6bdebb47565c 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -113,6 +113,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Sun, 6 Oct 2019 12:46:35 -0500
Subject: [PATCH] Add option to set armorstand step height
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 0ef9516fbe9283cb1aca71eb9dbdbec0d98c8fa4..9e37bf25689691f9640b294c482978e8e3b6e627 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -625,6 +625,7 @@ public class EntityArmorStand extends EntityLiving {
diff --git a/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
index c0e0750adef0ae6aff7635c84f6585f06c5fc38d..89d3734489b65245e815376edf4e2d9baea1563a 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
@@ -660,6 +660,7 @@ public class EntityArmorStand extends EntityLiving {
@Override
public void tick() {
@ -17,7 +17,7 @@ index 0ef9516fbe9283cb1aca71eb9dbdbec0d98c8fa4..9e37bf25689691f9640b294c482978e8
if (!this.canTick) {
if (this.noTickPoseDirty) {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index c2a13de7f0cafc8c93c5255e0f65f5e8ad439c7a..0fa01267fa35f1afdc81c2636f9efa8506bcebb6 100644
index 78218f2d59203b8f2b286fd09b3f6bdebb47565c..90f367f2f04f9bf66b7f54ffe784db16c7ca868b 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -63,6 +63,11 @@ public class PurpurWorldConfig {

View File

@ -4,23 +4,44 @@ Date: Thu, 26 Dec 2019 18:52:55 -0600
Subject: [PATCH] Cat spawning options
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index 2e514b8291a544a88667fbca2389bde4c2ecb109..288105ae657ade252032aa0ac9c191a8e8ebf549 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
@@ -47,6 +47,7 @@ public interface IEntityAccess {
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java
index 13d94ecd703b3cd0412e138532d2dd74e5bf250d..6082eed2d28f3be65daa7e7eb6f2c2a89bb28ff1 100644
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java
@@ -191,6 +191,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
((VillagePlaceSection) this.e(SectionPosition.a(blockposition).s())).a(blockposition);
}
+ default <T extends Entity> List<T> getEntitiesInAABB(Class<? extends T> oclass, AxisAlignedBB axisalignedbb) { return a(oclass, axisalignedbb); } // Purpur - OBFHELPER
default <T extends Entity> List<T> a(Class<? extends T> oclass, AxisAlignedBB axisalignedbb) {
return this.a(oclass, axisalignedbb, IEntitySelector.g);
+ public long count(Predicate<VillagePlaceType> predicate, BlockPosition blockposition, int i, VillagePlace.Occupancy villageplace_occupancy) { return a(predicate, blockposition, i, villageplace_occupancy); } // Purpur - OBFHELPER
public long a(Predicate<VillagePlaceType> predicate, BlockPosition blockposition, int i, VillagePlace.Occupancy villageplace_occupancy) {
return this.c(predicate, blockposition, i, villageplace_occupancy).count();
}
diff --git a/src/main/java/net/minecraft/server/MobSpawnerCat.java b/src/main/java/net/minecraft/server/MobSpawnerCat.java
index 5e17868a76ea8e3f105c11d496d6da12afa0da41..5a0f8779672a9e34f6970045361630ab5af3990b 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerCat.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerCat.java
@@ -16,7 +16,7 @@ public class MobSpawnerCat implements MobSpawner {
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlaceType.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlaceType.java
index db1ddce5774754891dc8a3ea5b66951ebc3a07a8..6a45ab049a4beeeaf7b3b5acf2946767f6e1198f 100644
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlaceType.java
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlaceType.java
@@ -53,7 +53,7 @@ public class VillagePlaceType {
public static final VillagePlaceType o = a("shepherd", a(Blocks.LOOM), 1, 1);
public static final VillagePlaceType p = a("toolsmith", a(Blocks.SMITHING_TABLE), 1, 1);
public static final VillagePlaceType q = a("weaponsmith", a(Blocks.GRINDSTONE), 1, 1);
- public static final VillagePlaceType r = a("home", VillagePlaceType.z, 1, 1);
+ public static final VillagePlaceType r = a("home", VillagePlaceType.z, 1, 1); public static VillagePlaceType home() { return r; } // Purpur - OBFHELPER
public static final VillagePlaceType s = a("meeting", a(Blocks.BELL), 32, 6);
public static final VillagePlaceType t = a("beehive", a(Blocks.BEEHIVE), 0, 1);
public static final VillagePlaceType u = a("bee_nest", a(Blocks.BEE_NEST), 0, 1);
@@ -92,6 +92,7 @@ public class VillagePlaceType {
return this.D;
}
+ public Predicate<VillagePlaceType> predicate() { return c(); } // Purpur - OBFHELPER
public Predicate<VillagePlaceType> c() {
return this.E;
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java b/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java
index 7a495cf88d723790ee3f63645cb4792052284f32..2f54c26151c049df9d071c887dd33e48df041437 100644
--- a/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java
+++ b/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java
@@ -34,7 +34,7 @@ public class MobSpawnerCat implements MobSpawner {
if (this.a > 0) {
return 0;
} else {
@ -29,7 +50,7 @@ index 5e17868a76ea8e3f105c11d496d6da12afa0da41..5a0f8779672a9e34f6970045361630ab
EntityPlayer entityplayer = worldserver.q_();
if (entityplayer == null) {
@@ -50,10 +50,12 @@ public class MobSpawnerCat implements MobSpawner {
@@ -68,10 +68,12 @@ public class MobSpawnerCat implements MobSpawner {
}
private int a(WorldServer worldserver, BlockPosition blockposition) {
@ -46,7 +67,7 @@ index 5e17868a76ea8e3f105c11d496d6da12afa0da41..5a0f8779672a9e34f6970045361630ab
if (list.size() < 5) {
return this.a(blockposition, worldserver);
@@ -64,9 +66,11 @@ public class MobSpawnerCat implements MobSpawner {
@@ -82,9 +84,11 @@ public class MobSpawnerCat implements MobSpawner {
}
private int b(WorldServer worldserver, BlockPosition blockposition) {
@ -61,41 +82,20 @@ index 5e17868a76ea8e3f105c11d496d6da12afa0da41..5a0f8779672a9e34f6970045361630ab
return list.size() < 1 ? this.a(blockposition, worldserver) : 0;
}
diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java
index 245bdedd17b844dcd13aa0b60dffb1cac6a5bdb8..64e251fb63e67b9ebf11779580b1bff6def6d1c6 100644
--- a/src/main/java/net/minecraft/server/VillagePlace.java
+++ b/src/main/java/net/minecraft/server/VillagePlace.java
@@ -178,6 +178,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
((VillagePlaceSection) this.e(SectionPosition.a(blockposition).s())).a(blockposition);
diff --git a/src/main/java/net/minecraft/world/level/IEntityAccess.java b/src/main/java/net/minecraft/world/level/IEntityAccess.java
index fd56b2f15e570f266a79c25823a3b3530a693510..18a5d11cce748695c8f03be565d2ea37a276a981 100644
--- a/src/main/java/net/minecraft/world/level/IEntityAccess.java
+++ b/src/main/java/net/minecraft/world/level/IEntityAccess.java
@@ -56,6 +56,7 @@ public interface IEntityAccess {
}
}
+ public long count(Predicate<VillagePlaceType> predicate, BlockPosition blockposition, int i, VillagePlace.Occupancy villageplace_occupancy) { return a(predicate, blockposition, i, villageplace_occupancy); } // Purpur - OBFHELPER
public long a(Predicate<VillagePlaceType> predicate, BlockPosition blockposition, int i, VillagePlace.Occupancy villageplace_occupancy) {
return this.c(predicate, blockposition, i, villageplace_occupancy).count();
}
diff --git a/src/main/java/net/minecraft/server/VillagePlaceType.java b/src/main/java/net/minecraft/server/VillagePlaceType.java
index a5718af9b614ae505067131f04ebb490617d6aa4..b6b4c8c491d692f93d2c38d602ff99b0611b72aa 100644
--- a/src/main/java/net/minecraft/server/VillagePlaceType.java
+++ b/src/main/java/net/minecraft/server/VillagePlaceType.java
@@ -44,7 +44,7 @@ public class VillagePlaceType {
public static final VillagePlaceType o = a("shepherd", a(Blocks.LOOM), 1, 1);
public static final VillagePlaceType p = a("toolsmith", a(Blocks.SMITHING_TABLE), 1, 1);
public static final VillagePlaceType q = a("weaponsmith", a(Blocks.GRINDSTONE), 1, 1);
- public static final VillagePlaceType r = a("home", VillagePlaceType.z, 1, 1);
+ public static final VillagePlaceType r = a("home", VillagePlaceType.z, 1, 1); public static VillagePlaceType home() { return r; } // Purpur - OBFHELPER
public static final VillagePlaceType s = a("meeting", a(Blocks.BELL), 32, 6);
public static final VillagePlaceType t = a("beehive", a(Blocks.BEEHIVE), 0, 1);
public static final VillagePlaceType u = a("bee_nest", a(Blocks.BEE_NEST), 0, 1);
@@ -83,6 +83,7 @@ public class VillagePlaceType {
return this.D;
}
+ public Predicate<VillagePlaceType> predicate() { return c(); } // Purpur - OBFHELPER
public Predicate<VillagePlaceType> c() {
return this.E;
+ default <T extends Entity> List<T> getEntitiesInAABB(Class<? extends T> oclass, AxisAlignedBB axisalignedbb) { return a(oclass, axisalignedbb); } // Purpur - OBFHELPER
default <T extends Entity> List<T> a(Class<? extends T> oclass, AxisAlignedBB axisalignedbb) {
return this.a(oclass, axisalignedbb, IEntitySelector.g);
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 0fa01267fa35f1afdc81c2636f9efa8506bcebb6..9c5de125a6ed207f238dff1e17e38a4083c4c251 100644
index 90f367f2f04f9bf66b7f54ffe784db16c7ca868b..9e935668147d1cd822f33c9e8d41e9541022aa8a 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -118,6 +118,15 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Thu, 2 Jan 2020 01:23:22 -0600
Subject: [PATCH] MC-147659 - Fix non black cats spawning in swamp huts
diff --git a/src/main/java/net/minecraft/server/MobSpawnerCat.java b/src/main/java/net/minecraft/server/MobSpawnerCat.java
index 5a0f8779672a9e34f6970045361630ab5af3990b..25bb494350cd771166a78a7b14726cee8f01b02e 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerCat.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerCat.java
@@ -80,8 +80,9 @@ public class MobSpawnerCat implements MobSpawner {
diff --git a/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java b/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java
index 2f54c26151c049df9d071c887dd33e48df041437..5d0da07970bfe304debe244e5df39981f90161f6 100644
--- a/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java
+++ b/src/main/java/net/minecraft/world/entity/npc/MobSpawnerCat.java
@@ -98,8 +98,9 @@ public class MobSpawnerCat implements MobSpawner {
if (entitycat == null) {
return 0;
} else {

View File

@ -4,11 +4,11 @@ Date: Sat, 4 May 2019 01:10:30 -0500
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 7cafc89e048e43f339f5289f38674b18d052e70d..4edb489012ddc9454e412f06acc4587a3572c8d3 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2791,6 +2791,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b7c72eaf5715a30bb8f82891f9830f9f62ec03c9..c8071e2909c03bd8eafb92fbf8fd8701642df1f9 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2886,6 +2886,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
this.invulnerable = flag;
}
@ -16,11 +16,40 @@ index 7cafc89e048e43f339f5289f38674b18d052e70d..4edb489012ddc9454e412f06acc4587a
public void u(Entity entity) {
this.setPositionRotation(entity.locX(), entity.locY(), entity.locZ(), entity.yaw, entity.pitch);
}
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index 42e6761c8b18b79ffd3f4d5e853ea87a2c153c23..cfb009c811bd2908d38da1b0007cb7aaed4e42c3 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -16,6 +16,7 @@ public class EntityCow extends EntityAnimal {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index ffc5ca763a22a1c4d06ffdb72c30482c13ec0a7b..1902b706345ff0031aaa8babde8cabffced99b78 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -176,7 +176,7 @@ public abstract class EntityLiving extends Entity {
public int maxNoDamageTicks;
public final float ay;
public final float az;
- public float aA;
+ public float aA; public float getRenderYawOffset() { return this.aA; } public void setRenderYawOffset(float f) { this.aA = f; } // Purpur - OBFHELPER
public float aB;
public float aC;
public float aD;
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java
index 1b43688ad232620410aa924cef02b54630ab1313..962dde5fcc617bc39b7d06a1e295370b9d60696c 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java
@@ -1,6 +1,7 @@
package net.minecraft.world.entity.animal;
import net.minecraft.core.BlockPosition;
+import net.minecraft.core.particles.Particles;
import net.minecraft.server.level.WorldServer;
import net.minecraft.sounds.SoundEffect;
import net.minecraft.sounds.SoundEffects;
@@ -28,6 +29,7 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.RecipeItemStack;
import net.minecraft.world.level.World;
+import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.IBlockData;
// CraftBukkit start
@@ -46,6 +48,7 @@ public class EntityCow extends EntityAnimal {
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalPanic(this, 2.0D));
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
@ -28,7 +57,7 @@ index 42e6761c8b18b79ffd3f4d5e853ea87a2c153c23..cfb009c811bd2908d38da1b0007cb7aa
this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT), false));
this.goalSelector.a(4, new PathfinderGoalFollowParent(this, 1.25D));
this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 1.0D));
@@ -70,11 +71,80 @@ public class EntityCow extends EntityAnimal {
@@ -100,11 +103,80 @@ public class EntityCow extends EntityAnimal {
entityhuman.a(enumhand, itemstack1);
return EnumInteractionResult.a(this.world.isClientSide);
@ -109,21 +138,8 @@ index 42e6761c8b18b79ffd3f4d5e853ea87a2c153c23..cfb009c811bd2908d38da1b0007cb7aa
@Override
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 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 {
public int maxNoDamageTicks;
public final float ay;
public final float az;
- public float aA;
+ public float aA; public float getRenderYawOffset() { return this.aA; } public void setRenderYawOffset(float f) { this.aA = f; } // Purpur - OBFHELPER
public float aB;
public float aC;
public float aD;
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 9c5de125a6ed207f238dff1e17e38a4083c4c251..0c841b824a93d5e43bad171d1ca828eca3e891df 100644
index 9e935668147d1cd822f33c9e8d41e9541022aa8a..277cc8361e8faf54b95be1e9f1467a97de14ecc4 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -132,6 +132,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Fri, 3 May 2019 23:53:16 -0500
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 c9112f783c81d58570e622a0e784da1e2a93d0ff..91cfe60f764a573e3724b48a9ae02e806c1e4fb8 100644
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
@@ -136,7 +136,13 @@ public class EntityMushroomCow extends EntityCow implements IShearable {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityMushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/EntityMushroomCow.java
index 9face4480dcc89d9106ebe596020c1888350ef2d..d28d4d2c1eff2c130f49c2bce3c19da212dba5dc 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityMushroomCow.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityMushroomCow.java
@@ -172,7 +172,13 @@ public class EntityMushroomCow extends EntityCow implements IShearable {
entitycow.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch);
entitycow.setHealth(this.getHealth());

View File

@ -4,11 +4,11 @@ Date: Sun, 12 May 2019 01:14:46 -0500
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 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 {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityPig.java b/src/main/java/net/minecraft/world/entity/animal/EntityPig.java
index 676ca381a5e111fc15f319e73504e4e60dbf0d2b..1a540e41e6161d011ca4ed30c68ae9df4567b8db 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityPig.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityPig.java
@@ -156,6 +156,18 @@ public class EntityPig extends EntityAnimal implements ISteerable, ISaddleable {
if (!flag && this.hasSaddle() && !this.isVehicle() && !entityhuman.eq()) {
if (!this.world.isClientSide) {
@ -28,7 +28,7 @@ index 01ca5983cade997b1f0d27fdf495c74c6daa0922..6ea3e4ffc3f42f4282adf3554944f24d
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 0c841b824a93d5e43bad171d1ca828eca3e891df..24ef91788ff69004eed1b136a0ceb6176db00e76 100644
index 277cc8361e8faf54b95be1e9f1467a97de14ecc4..5ac1aba522151c42255caf9d29c5b780218ccd32 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -188,6 +188,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Fri, 3 May 2019 23:58:44 -0500
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 a11c599a9779aa084a1d7d1b6b3485d5b9c23906..c39f3c06eb199a24f32a5c581e877073b580502c 100644
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
@@ -124,6 +124,14 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java
index b1e2892c7c9f0e35f69332e93917593d97c304a8..44119f52a4f169ffcea53fb69393bfedfd1a62a7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java
@@ -160,6 +160,14 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
}
return EnumInteractionResult.a(this.world.isClientSide);
@ -23,7 +23,7 @@ index a11c599a9779aa084a1d7d1b6b3485d5b9c23906..c39f3c06eb199a24f32a5c581e877073
} else {
return EnumInteractionResult.PASS;
}
@@ -134,6 +142,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
@@ -170,6 +178,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);
@ -32,7 +32,7 @@ index a11c599a9779aa084a1d7d1b6b3485d5b9c23906..c39f3c06eb199a24f32a5c581e877073
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 24ef91788ff69004eed1b136a0ceb6176db00e76..609307a409365829e61430da47aa75125afcb8c4 100644
index 5ac1aba522151c42255caf9d29c5b780218ccd32..fa01ef3c0cc723acaaf348066cddf91f1deb3c72 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -208,6 +208,13 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Sat, 24 Aug 2019 14:42:54 -0500
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 50b93c93cfede2d64a996a22b811994b352149af..de025a48c7ca08d8ae71d2d9239121dc4a86a339 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 {
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
index 07160de8725787551df327c0790b2d6e0876524f..3fff101637708a1a12f9a457bd3512ae94a8f884 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
@@ -613,7 +613,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
boolean flag = this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT);
short short0 = 500;
@ -18,7 +18,7 @@ index 50b93c93cfede2d64a996a22b811994b352149af..de025a48c7ca08d8ae71d2d9239121dc
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 609307a409365829e61430da47aa75125afcb8c4..66c0725c3dc28e49387d2b9f1a15aa0758763c08 100644
index fa01ef3c0cc723acaaf348066cddf91f1deb3c72..bab91f0416f31a8273593bb7725658674eb41621 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -142,6 +142,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,19 @@ Date: Fri, 24 May 2019 02:39:25 -0500
Subject: [PATCH] Signs editable on right click
diff --git a/src/main/java/net/minecraft/server/BlockSign.java b/src/main/java/net/minecraft/server/BlockSign.java
index 3585fd82c14338a82302ca403e91e6cfe65e1c19..770ad5edfb44acb69e7da33226ca6bf7c01a77b7 100644
--- a/src/main/java/net/minecraft/server/BlockSign.java
+++ b/src/main/java/net/minecraft/server/BlockSign.java
@@ -56,6 +56,17 @@ public abstract class BlockSign extends BlockTileEntity implements IBlockWaterlo
diff --git a/src/main/java/net/minecraft/world/level/block/BlockSign.java b/src/main/java/net/minecraft/world/level/block/BlockSign.java
index 6b461080439dd9ce5b8d34b79d446558bbd5c1f1..19f4403b9f1142c71e7b2c7c0fd5a78027d4ffe4 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockSign.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockSign.java
@@ -6,6 +6,7 @@ import net.minecraft.world.EnumHand;
import net.minecraft.world.EnumInteractionResult;
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.item.ItemDye;
+import net.minecraft.world.item.ItemSign;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GeneratorAccess;
import net.minecraft.world.level.IBlockAccess;
@@ -80,6 +81,17 @@ public abstract class BlockSign extends BlockTileEntity implements IBlockWaterlo
}
}
@ -26,11 +34,11 @@ index 3585fd82c14338a82302ca403e91e6cfe65e1c19..770ad5edfb44acb69e7da33226ca6bf7
return tileentitysign.b(entityhuman) ? EnumInteractionResult.SUCCESS : EnumInteractionResult.PASS;
} 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 3c7847b1156a486e253a0e9f74a857e841d90619..1e6bb566c0a718bba289b2e727a832e0aa6b7f15 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -112,6 +112,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
index 7f78f388584899b13ff983f0dc37c679bfb1507e..96d0524482281f8570464962c0fd5319199440d7 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
@@ -132,6 +132,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
return this.isEditable;
}
@ -39,7 +47,7 @@ index 3c7847b1156a486e253a0e9f74a857e841d90619..1e6bb566c0a718bba289b2e727a832e0
// Paper start
//this.c = entityhuman;
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 66c0725c3dc28e49387d2b9f1a15aa0758763c08..8393a0253ac16a8f15f78288d6cc31f8688c403c 100644
index bab91f0416f31a8273593bb7725658674eb41621..ea95a4116371d58eb36be51093af7f0fa28e3dfd 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -109,6 +109,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Thu, 6 Jun 2019 17:40:30 -0500
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 ee1bb58ce2fdaa4cc347476b8f040c346d029cf1..4cd9937d97343e33a4c417b4a7af9ee2601b18b0 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1449,6 +1449,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 7cd1ae92768164b657af9febe9b4feb7fd02f55a..fe583fbc58309564d35d4cdd56fafc4de8ba31c8 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -1579,6 +1579,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public void openSign(TileEntitySign tileentitysign) {
@ -16,11 +16,11 @@ index ee1bb58ce2fdaa4cc347476b8f040c346d029cf1..4cd9937d97343e33a4c417b4a7af9ee2
tileentitysign.a((EntityHuman) this);
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 be29ecfa00d53ad2067015a5261184b4157c604b..4d0dcbcc00e44c4912302dd0e7331471f33cb370 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2902,6 +2902,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 68200fe85fc4e66bb58dd35df306ba37604b6b94..bbb3b44bdceb8fb0363f771b8cf1b8245b5c8d3d 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -3047,6 +3047,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}
// Paper end
@ -36,19 +36,19 @@ index be29ecfa00d53ad2067015a5261184b4157c604b..4d0dcbcc00e44c4912302dd0e7331471
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.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 1e6bb566c0a718bba289b2e727a832e0aa6b7f15..cbbaf8ca4b6425e2ce58e500b13b3b5269704c3c 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
index 96d0524482281f8570464962c0fd5319199440d7..a87a2fa507dc3bd6d9979db5868e7ef6ea1eddbd 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
@@ -1,6 +1,7 @@
package net.minecraft.world.level.block.entity;
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 { //
import javax.annotation.Nullable;
import net.minecraft.commands.CommandListenerWrapper;
import net.minecraft.commands.ICommandListener;
@@ -112,6 +113,18 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
this.g[i] = null;
}
@ -68,7 +68,7 @@ index 1e6bb566c0a718bba289b2e727a832e0aa6b7f15..cbbaf8ca4b6425e2ce58e500b13b3b52
@Override
public PacketPlayOutTileEntityData getUpdatePacket() {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 8393a0253ac16a8f15f78288d6cc31f8688c403c..484da2bf267cab4e4569c98111398af64c834eed 100644
index ea95a4116371d58eb36be51093af7f0fa28e3dfd..b67f87f38d0ff99ff62d2103ecc737317a435102 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -109,8 +109,10 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Fri, 21 Jun 2019 14:37:10 -0500
Subject: [PATCH] Allow soil to moisten from water directly under it
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
index a315e2628c35ee713b68741c6e52c4b140c05f27..8dd48669c29dd51ed4d535dad0b0319f4bb2250c 100644
--- a/src/main/java/net/minecraft/server/BlockSoil.java
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
@@ -116,19 +116,14 @@ public class BlockSoil extends Block {
diff --git a/src/main/java/net/minecraft/world/level/block/BlockSoil.java b/src/main/java/net/minecraft/world/level/block/BlockSoil.java
index 3bedb1c6a0f221c7b40ee0a50f676e8b05bd37a7..2bbaa2fb426869223a9b2f07406496c1b0daff3f 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockSoil.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockSoil.java
@@ -139,19 +139,14 @@ public class BlockSoil extends Block {
}
private static boolean a(IWorldReader iworldreader, BlockPosition blockposition) {
@ -36,7 +36,7 @@ index a315e2628c35ee713b68741c6e52c4b140c05f27..8dd48669c29dd51ed4d535dad0b0319f
@Override
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 484da2bf267cab4e4569c98111398af64c834eed..56793a9e8f963b63a22aac5337299fbfb07389f0 100644
index b67f87f38d0ff99ff62d2103ecc737317a435102..2e4a928a3e88fb3d961d9530695cd7154321c79b 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -109,6 +109,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,19 @@ Date: Sat, 29 Jun 2019 02:32:40 -0500
Subject: [PATCH] Controllable Minecarts
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 2291135eaef64c403183724cb6e413cd7e472672..bc61aaff65a7dc1e7534452b285953b83adb7000 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -36,6 +36,12 @@ public class BlockPosition extends BaseBlockPosition {
diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java
index 8edc279e7a3fdfb7e10718f1deee34b7e3fb2f28..a01b69c43acf4beb65c8b7a8a800c44121068d46 100644
--- a/src/main/java/net/minecraft/core/BlockPosition.java
+++ b/src/main/java/net/minecraft/core/BlockPosition.java
@@ -11,6 +11,7 @@ import java.util.stream.StreamSupport;
import javax.annotation.concurrent.Immutable;
import net.minecraft.SystemUtils;
import net.minecraft.util.MathHelper;
+import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.block.EnumBlockRotation;
import net.minecraft.world.level.levelgen.structure.StructureBoundingBox;
import net.minecraft.world.phys.AxisAlignedBB;
@@ -42,6 +43,12 @@ public class BlockPosition extends BaseBlockPosition {
private static final int m = 38;
// Paper end
@ -21,11 +29,31 @@ index 2291135eaef64c403183724cb6e413cd7e472672..bc61aaff65a7dc1e7534452b285953b8
public BlockPosition(int i, int j, int k) {
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 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 {
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index fe583fbc58309564d35d4cdd56fafc4de8ba31c8..4a2ea4c83107e957bda69604ca0ae98c504cf962 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -106,6 +106,7 @@ import net.minecraft.world.entity.monster.EntityMonster;
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.entity.player.EnumChatVisibility;
import net.minecraft.world.entity.projectile.EntityArrow;
+import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
import net.minecraft.world.inventory.Container;
import net.minecraft.world.inventory.ContainerHorse;
import net.minecraft.world.inventory.ICrafting;
@@ -1132,6 +1133,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (this.isInvulnerable(damagesource)) {
return false;
} else {
+ if (damagesource == DamageSource.FALL && getRootVehicle() instanceof EntityMinecartAbstract && world.purpurConfig.controllableMinecarts && !world.purpurConfig.controllableMinecartsFallDamage) return false; // Purpur
boolean flag = this.server.j() && this.canPvP() && "fall".equals(damagesource.translationIndex);
if (!flag && isSpawnInvulnerable() && damagesource != DamageSource.OUT_OF_WORLD) { // Purpur
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 1902b706345ff0031aaa8babde8cabffced99b78..c3acf0de92f1dbbcfbe7a9673c843107a6bd00b7 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -194,9 +194,9 @@ public abstract class EntityLiving extends Entity {
protected int aO;protected int getKillCount() { return this.aO; } // Paper - OBFHELPER
public float lastDamage;
public boolean jumping; // Paper protected -> public
@ -38,11 +66,11 @@ index 8cc440e0e7108e2c7ca29b2f8a2fc5a723dcef0d..46b1bc644c0584fe7006ea9f111d7f48
protected int aU;
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 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 {
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
index 75a88ab5d5b0fdb98ea8d61bb6b82049b21101f3..3cd9a7956f9cbb3f66764adfede12b3b25024c41 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
@@ -484,16 +484,62 @@ public abstract class EntityMinecartAbstract extends Entity {
public void a(int i, int j, int k, boolean flag) {}
@ -52,11 +80,11 @@ index be859a1b41254b299a507d03e453dc8efee6f3dd..4de2877f30a9b231a5c8bbd173941699
+ public double getControllableSpeed() {
+ BlockPosition position = new BlockPosition(this);
+ Block block = world.getType(position).getBlock();
+ if (!block.material.isSolid()) {
+ if (!block.getMaterial().isSolid()) {
+ block = world.getType(position.shift(EnumDirection.DOWN)).getBlock();
+ }
+ Double speed = world.purpurConfig.controllableMinecartsBlockSpeeds.get(block);
+ if (!block.material.isSolid()) {
+ if (!block.getMaterial().isSolid()) {
+ speed = lastSpeed;
+ } else if (speed == null) {
+ speed = world.purpurConfig.controllableMinecartsBaseSpeed;
@ -105,23 +133,11 @@ index be859a1b41254b299a507d03e453dc8efee6f3dd..4de2877f30a9b231a5c8bbd173941699
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 4cd9937d97343e33a4c417b4a7af9ee2601b18b0..f200faf78ab887d1b58677e20039765cb67ac6b8 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1002,6 +1002,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (this.isInvulnerable(damagesource)) {
return false;
} else {
+ if (damagesource == DamageSource.FALL && getRootVehicle() instanceof EntityMinecartAbstract && world.purpurConfig.controllableMinecarts && !world.purpurConfig.controllableMinecartsFallDamage) return false; // Purpur
boolean flag = this.server.j() && this.canPvP() && "fall".equals(damagesource.translationIndex);
if (!flag && isSpawnInvulnerable() && damagesource != DamageSource.OUT_OF_WORLD) { // Purpur
diff --git a/src/main/java/net/minecraft/server/ItemMinecart.java b/src/main/java/net/minecraft/server/ItemMinecart.java
index ceef7aaf923026ff1044d6feba4297279eb44157..002651aaf3b8a9b489fe323756cd1ad13f9874e8 100644
--- a/src/main/java/net/minecraft/server/ItemMinecart.java
+++ b/src/main/java/net/minecraft/server/ItemMinecart.java
@@ -103,8 +103,10 @@ public class ItemMinecart extends Item {
diff --git a/src/main/java/net/minecraft/world/item/ItemMinecart.java b/src/main/java/net/minecraft/world/item/ItemMinecart.java
index 527f3ed664854cdd938c34f00a064bc2f77148cc..d50a1093aa9b6d7187b59566309a3abd05125e07 100644
--- a/src/main/java/net/minecraft/world/item/ItemMinecart.java
+++ b/src/main/java/net/minecraft/world/item/ItemMinecart.java
@@ -121,8 +121,10 @@ public class ItemMinecart extends Item {
IBlockData iblockdata = world.getType(blockposition);
if (!iblockdata.a((Tag) TagsBlock.RAILS)) {
@ -134,7 +150,7 @@ index ceef7aaf923026ff1044d6feba4297279eb44157..002651aaf3b8a9b489fe323756cd1ad1
ItemStack itemstack = itemactioncontext.getItemStack();
if (!world.isClientSide) {
@@ -131,6 +133,6 @@ public class ItemMinecart extends Item {
@@ -149,6 +151,6 @@ public class ItemMinecart extends Item {
itemstack.subtract(1);
return EnumInteractionResult.a(world.isClientSide);
@ -142,19 +158,39 @@ index ceef7aaf923026ff1044d6feba4297279eb44157..002651aaf3b8a9b489fe323756cd1ad1
+ //} // Purpur - place minecarts anywhere
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 596b4597313b87296d39027b13555b5ad1cba9e6..5ea059cde9e1a089c2ade12512e4a7abd07c5b8a 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -41,6 +41,7 @@ import net.minecraft.world.level.block.entity.TileEntity;
import net.minecraft.world.level.block.state.BlockBase;
import net.minecraft.world.level.block.state.BlockStateList;
import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.storage.loot.LootTableInfo;
import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
import net.minecraft.world.phys.Vec3D;
@@ -83,6 +84,7 @@ public class Block extends BlockBase implements IMaterial {
return timing;
}
// Paper end
+ public Material getMaterial() { return material; } // Purpur - OBFHELPER
@Nullable
private String name;
@Nullable
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 56793a9e8f963b63a22aac5337299fbfb07389f0..c6682064ff5d653d14f658396a6a5461d4554fab 100644
index 2e4a928a3e88fb3d961d9530695cd7154321c79b..3a6a19bd4e952a6deb1def80755387cab75bbad8 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1,5 +1,7 @@
@@ -1,13 +1,18 @@
package net.pl3x.purpur;
+import net.minecraft.server.Block;
+import net.minecraft.server.Blocks;
import net.minecraft.server.IRegistry;
import net.minecraft.server.Item;
import net.minecraft.server.Items;
@@ -7,7 +9,10 @@ import net.minecraft.server.MinecraftKey;
import net.minecraft.core.IRegistry;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.resources.MinecraftKey;
import org.bukkit.configuration.ConfigurationSection;
import java.util.ArrayList;

View File

@ -4,11 +4,11 @@ Date: Wed, 3 Jul 2019 23:58:31 -0500
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 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 {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index c3acf0de92f1dbbcfbe7a9673c843107a6bd00b7..1602c00e04cccdee4e9eb4f4512145e8b1aeaf57 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1598,8 +1598,10 @@ public abstract class EntityLiving extends Entity {
this.dropInventory(); // CraftBukkit - from below
if (this.cW() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
@ -20,7 +20,7 @@ index 46b1bc644c0584fe7006ea9f111d7f4837299dc9..1dddf80e11db54a666de8c3b0d7a5c8a
// CraftBukkit start - Call death event
org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index c6682064ff5d653d14f658396a6a5461d4554fab..8d1ad37f17935331ee867c15f91842cdc53d4450 100644
index 3a6a19bd4e952a6deb1def80755387cab75bbad8..b16ea97f4119fe2cd7c218f3fecbb7202c362665 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -112,6 +112,11 @@ public class PurpurWorldConfig {

View File

@ -4,11 +4,11 @@ Date: Sun, 21 Jul 2019 18:01:46 -0500
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 f200faf78ab887d1b58677e20039765cb67ac6b8..ce48b823db35ca2d7557cfc840801349b19cbd54 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1426,7 +1426,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 4a2ea4c83107e957bda69604ca0ae98c504cf962..e129480fa1045fbeaafa97045d53696b44952bcf 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -1557,7 +1557,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public boolean isInvulnerable(DamageSource damagesource) {

View File

@ -4,11 +4,20 @@ Date: Wed, 10 Jul 2019 20:43:05 -0500
Subject: [PATCH] Option to toggle milk curing bad omen
diff --git a/src/main/java/net/minecraft/server/ItemMilkBucket.java b/src/main/java/net/minecraft/server/ItemMilkBucket.java
index fcf254bbaeb3c0ffdb6834a8d5ad2c3cf4235e5b..79554e18fc39ecd9db87618a59d2e6709049820e 100644
--- a/src/main/java/net/minecraft/server/ItemMilkBucket.java
+++ b/src/main/java/net/minecraft/server/ItemMilkBucket.java
@@ -20,7 +20,9 @@ public class ItemMilkBucket extends Item {
diff --git a/src/main/java/net/minecraft/world/item/ItemMilkBucket.java b/src/main/java/net/minecraft/world/item/ItemMilkBucket.java
index 6085c5f75bd85cca3462613c18c2e2bf26205d1b..e20452f55c531f76ecaae9ba5d0ea3f8edf96127 100644
--- a/src/main/java/net/minecraft/world/item/ItemMilkBucket.java
+++ b/src/main/java/net/minecraft/world/item/ItemMilkBucket.java
@@ -5,6 +5,8 @@ import net.minecraft.server.level.EntityPlayer;
import net.minecraft.stats.StatisticList;
import net.minecraft.world.EnumHand;
import net.minecraft.world.InteractionResultWrapper;
+import net.minecraft.world.effect.MobEffect;
+import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.EntityLiving;
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.level.World;
@@ -29,7 +31,9 @@ public class ItemMilkBucket extends Item {
}
if (!world.isClientSide) {
@ -19,7 +28,7 @@ index fcf254bbaeb3c0ffdb6834a8d5ad2c3cf4235e5b..79554e18fc39ecd9db87618a59d2e670
return itemstack.isEmpty() ? new ItemStack(Items.BUCKET) : itemstack;
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 8d1ad37f17935331ee867c15f91842cdc53d4450..bec457e5aac17b0db0788110ceda778c81f26042 100644
index b16ea97f4119fe2cd7c218f3fecbb7202c362665..a892d9af3753c4ca8f3733c64bece1cd1ed468c6 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -113,8 +113,10 @@ public class PurpurWorldConfig {

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