Commit Graph

3162 Commits

Author SHA1 Message Date
Riley Park
4ef1d13622 legacy formatting will be the death of me 2021-03-09 10:03:27 -08:00
Riley Park
a597c7d687 legacy formatting is worse than walking around in wet socks 2021-03-09 09:27:12 -08:00
Riley Park
0eaa2dd444 Use implementation-provided legacy serializer for events 2021-03-08 17:11:17 -08:00
Riley Park
246dff9c8b Adventure 4.7.0 2021-03-08 16:44:40 -08:00
Mariell Hoversholm
930599fcbf Respect teams in legacy chat name if configured (#5321) 2021-03-09 00:14:49 +01:00
Josh Roy
8a65e6b959 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5325)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
d264e972 #591: Add option for a consumer before spawning an item
1c537fce #590: Add spawn and transform reasons for piglin zombification.

CraftBukkit Changes:
ee5006d1 #810: Add option for a consumer before spawning an item
f6a39d3c #809: Add spawn and transform reasons for piglin zombification.
0c24068a Organise imports

Spigot Changes:
bff52619 Organise imports
2021-03-08 18:12:31 -05:00
Riley Park
b154b7f941 Fix title swapping fadeIn and stay 2021-03-08 12:36:03 -08:00
chickeneer
2fffeb4a36 Prevent grindstones from overstacking items 2021-02-16 21:38:35 -06:00
Jake Potrebic
59fd0e3a84 fix per-world difficulty command (#5306) 2021-03-07 00:37:05 -08:00
Jake Potrebic
5bd9ea9bb0 added PlayerNameEntityEvent 2021-03-04 11:42:44 -08:00
Jake Potrebic
faa8969e12 Add worldborder events 2021-01-04 22:41:02 -08:00
Jake Potrebic
aad9b036bc consider enchants for destroy speed 2021-01-03 23:18:34 -08:00
Jake Potrebic
4c24cd0ef3 fix file conversion 2021-01-04 19:49:50 -08:00
Phoenix616
6e29351ca9 Make discovered maps config work in treasure maps from loot tables too 2021-01-28 20:18:38 +01:00
Trigary
2fdb229830 stop firing pressure plate EntityInteractEvent for ignored entities (fixes #4962) 2021-02-02 09:29:55 +01:00
Shane Freeder
5eab69f416 Do not use the bukkit singleton for the GUI (Fixes #5301) 2021-03-04 01:39:18 +00:00
Josh Roy
53f27183bf Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5299)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9d0ad318 Fix javadoc errors in previous commits
9501daa2 #578: Add methods to modify the rate of regeneration and starvation
197d8f3d #577: Add EntityExhaustionEvent

CraftBukkit Changes:
a021e334 #795: Add methods to modify the rate of regeneration and starvation
509e523c #792: Add EntityExhaustionEvent

Spigot Changes:
db99f821 Rebuild patches
2021-03-03 17:43:45 -05:00
AlexProgrammerDE
db12dd64e2 Improve ServerGUI
- Added logo to server frame
- Show tps in the server stats
2020-10-03 08:28:22 +02:00
Mariell Hoversholm
cd9197ab62 Throw proper exception on empty JsonList file
Related to #4174, #4717.

As it stands, `JsonList` throws an NPE on `jsonarray.iterator()` when
the reader given is at EOF. This means there is an unintelligible
message shown to the player:

```
[16:44:31 ERROR]: Encountered an unexpected exception
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonArray.iterator()" because "jsonarray" is null
	at net.minecraft.server.v1_16_R2.JsonList.load(JsonList.java:192) ~[patched_1.16.3.jar:git-Paper-248]
	at net.minecraft.server.v1_16_R2.DedicatedPlayerList.y(SourceFile:95) ~[patched_1.16.3.jar:git-Paper-248]
	...
```

This is clearly not understandable to the untrained eye: what is
`jsonarray`? What is `DedicatedPlayerList.y`?

This rather does a proper exception message:

```
[16:42:59 ERROR]: Encountered an unexpected exception
java.lang.NullPointerException: The file "banned-players.json" is either empty or corrupt
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[paper-1.16.3.jar:git-Paper-"c7e0a94a2"]
	at net.minecraft.server.v1_16_R2.JsonList.load(JsonList.java:190) ~[paper-1.16.3.jar:git-Paper-"c7e0a94a2"]
	at net.minecraft.server.v1_16_R2.DedicatedPlayerList.y(SourceFile:95) ~[paper-1.16.3.jar:git-Paper-"c7e0a94a2"]
	...
```

It is still an exception, which server owners may or may not understand,
but the message now says exactly what went wrong, and who would've
known, now we know what `DedicatedPlayerList.y` is, and we know what
file was broken.

This is more of a quality of life change, but it is certainly useful to
the server owners that come into `#paper-help` and the issue tracker
(#4174) to ask for help with unintelligible messages we need to open a
patched Paper project to make any sense out of.

Check state of jsonarray instead of checkNotNull

Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
2020-11-01 16:43:31 +01:00
Jake Potrebic
31de60a66f Fix interact event in adventure mode 2021-01-06 13:43:39 -08:00
TheShermanTanker
f4d6a5ebc1 MC-29274: Fix Wither hostility towards players 2020-10-01 01:18:12 +08:00
Eric Su
ac37abff18 Fixed furnace cook-speed multiplier losing precision when calculating cook time 2020-10-29 15:32:14 -07:00
lukas81298
66415b48bc Do not create unnecessary copies of the passenger list 2020-12-20 01:50:50 +01:00
Jake Potrebic
b780d4099f added tnt minecarts to the tnt height nerf 2020-12-02 22:08:20 -08:00
Bjarne Koll
64e1a54657 Remove streams from SensorNearest
The behavioural nearby sensors are validated every tick on the entities
that registered the respective sensors and are therefore a good subject
to performance improvements.

More specifically this commit replaces the Stream#filter usage with
ArrayList#removeIf as the removeIf method on an array list is heavily
optimized towards a single internal array re-allocation without any
further overhead on the removeIf call.

The only negative of this change is the rather agressive diff these
patches introduce as the methods are basically being reimplemented
compared to the previous stream-based implementation.

See: https://nipafx.dev/java-stream-performance/
Note: Updated LICENCE.md to release this commit under MIT
2021-03-03 03:52:43 +01:00
MiniDigger | Martin
de5a2a4108 fix nullability of playerlist header/footer, closes #5290 2021-03-03 20:08:25 +01:00
Jason Penilla
b0df4d17c8 Fix Material#getTranslationKey for Block Materials (#5294)
* Fix Material#getTranslationKey for Block Materials

* Cache the result of Material#isBlock
2021-03-02 16:27:34 -08:00
Riley Park
b24a51c0e3 fix #5292 with help from @JRoy 2021-03-02 08:39:36 -08:00
Riley Park
c0db0192b2 New chat events for better Adventure support (#5289)
Bump Adventure to 4.6.0

fixes #5216
fixes #5261
fixes #5287
2021-03-01 19:07:12 -08:00
Camotoy
4299111876 Fix username connecting with no texture being overwritten by usercache (#4970) 2021-03-01 16:06:05 -05:00
Riley Park
7bb59f4a28 fix #5279 - clickable links again 2021-02-28 18:40:19 -08:00
Michael
a26dc45546 Print command usage for /paper entity list at more places (#5282) 2021-02-28 15:01:26 -08:00
Paul Zhang
1bc1a162c4 Implements PlayerHandshakeEvent#getOriginalSocketAddressHostname and deprecates PlayerHandshakeEvent(String, boolean) in favour of PlayerHandshakeEvent(String, String, boolean) 2021-02-23 16:47:06 +01:00
Tom
f1400a74c5 Expose Tracked Players
A lot of plugins seem to use reflection to determine this, so this could be a bit of a starter-patch as future PR'ers could also exposed tracked entities as well.
2021-02-26 16:27:53 -06:00
Tom
b190bc7e8a Clear SyncLoadInfo 2021-02-26 16:14:02 -06:00
Mariell Hoversholm
04fbd54c3b fix: legacy component serialisation was wiped out
When merging 2e419805ad, nobody caught the
fact we removed the component serialisation of legacy BungeeCord Chat
API components in the PacketPlayOutTitle class.

Test plugin code:

```kotlin
class LegacyMessageCommand : BaseCommand() {
    override fun register(manager: PaperCommandManager<CommandSender>) {
        manager.command(manager.commandBuilder("legacymsg")
            .sender<Player>()
            .handler {
                val component = ComponentBuilder("Test")
                    .color(ChatColor.DARK_RED)
                    .bold(true)
                    .append(" message")
                    .bold(false)
                    .color(ChatColor.of("#f8a8a8"))
                    .event(
                        HoverEvent(
                            HoverEvent.Action.SHOW_TEXT,
                            Text(
                                ComponentBuilder("Test hover")
                                    .color(ChatColor.AQUA)
                                    .underlined(true)
                                    .create()
                            )
                        )
                    )
                    .event(
                        ClickEvent(
                            ClickEvent.Action.SUGGEST_COMMAND,
                            "/legacymsg"
                        )
                    )
                    .create()
                it.sender.sendMessage(*component)
                it.sender.sendActionBar(*component)
                it.sender.sendTitle(
                    Title.builder()
                        .title(component)
                        .subtitle(component)
                        .fadeIn(40)
                        .stay(60)
                        .fadeOut(40)
                        .build()
                )
            })
    }
}
```

Fixes GH-5271.
2021-02-27 12:02:06 +01:00
Mariell Hoversholm
31433b07f6 Add config option for displayname in quit message (#5260)
This restores the behaviour to vanilla by default, but may be changed if
one wants to.

Fixes #5259.
2021-02-26 18:54:48 +01:00
Josh Roy
fb41a4b95e Fix further issues with rgb text pattern matching 2021-02-25 13:27:15 -05:00
Shane Freeder
1487ee284e Don't grab the threads stacktrace when dumping same thread
For some reason, this doesn't always seem to capture all states of shutdown,
either the logger is just being fun, or, potentially, the thread is already
marked as dead when we're getting called so the trace is not generated through
the method on Thread
2021-02-24 18:45:21 +00:00
Riley Park
46be0dcaf3 Display name should never be null 2021-02-23 16:48:02 -08:00
Riley Park
2e594bd059 Don't try to deserialize a null string in legacy method 2021-02-23 13:40:49 -08:00
Shane Freeder
89e9a596cb Misc thread dumps (#5200) 2021-02-23 21:06:12 +00:00
Jason Penilla
9cf511130f Replace usages of LegacyComponentSerializer.legacySection() in Paper-Server with PaperAdventure.LEGACY_SECTION_UXRC (#5233) 2021-02-23 05:45:09 -08:00
Jason Penilla
36e0569896 Enable Hex colors on PaperAdventure.LEGACY_SECTION_UXRC, and use it for sending messages to console command sender (#5230)
This fixes messages to console having colors stripped, and also fixes colors being downsampled in PlayerConnection#disconnect(String)
2021-02-22 22:43:49 -08:00
chickeneer
3d23a7351e PlayerDeathEvent#getDeathMessage should provide translation for legacy reasons #5227 2021-02-22 20:42:58 -06:00
Josh Roy
cd60d3a8f9 Fix Log4J converter not parsing hex without named colors (#5228) 2021-02-22 21:43:05 -05:00
Riley Park
30fd8a86d9 fix #5224 2021-02-22 10:24:44 -08:00
Riley Park
3effca65b6 fix? #5222 2021-02-22 05:33:41 -08:00
Riley Park
33e2178416 fix? #5218 2021-02-22 04:31:51 -08:00
Riley Park
6d82aa6d89 fix #5217 2021-02-22 03:12:40 -08:00
Riley Park
7b8399ab04 fix #5214 2021-02-22 01:53:53 -08:00
Riley Park
e1763a2679 fix stupid legacy chat garbage 2021-02-22 00:45:21 -08:00
Riley Park
b856bf08b9 fix #5212 and #5213 2021-02-22 00:03:03 -08:00
MiniDigger | Martin
db0dd75a20 Upstream Update (#5211) 2021-02-21 21:55:01 +01:00
Josh Roy
8bafdd49dc Add support for hex color codes in console 2021-02-20 13:12:58 -05:00
Riley Park
2e419805ad We're going on an Adventure! (#4842)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-02-21 11:45:33 -08:00
Bierque Jason
1f2b6f865b Stop loop when flags set to false (#5101) 2021-02-21 13:34:08 +01:00
Max Lee
bcb2a139ee Call PreCreatureSpawnEvent for more spawn reasons (#5201) 2021-02-18 22:39:03 +01:00
Shane Freeder
20e500fadc Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
1e843b72 #510: Add NamespacedKey#fromString() to fetch from user input
a4d18241 #581: Add methods to modify despawn delay for wandering villagers

CraftBukkit Changes:
0cd8f19f #802: Add methods to modify despawn delay for wandering villagers
d5c5d998 SPIGOT-6362: ConcurrentModificationException: null --> Server Crash
8c7d69fe SPIGOT-5228: Entities that are removed during chunk unloads are not properly removed from the chunk.
2021-02-16 17:08:29 +00:00
Automated
c51e3e6e51 [Auto] Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
5b289e69 SPIGOT-5778: Added World.getGameTime method

CraftBukkit Changes:
d97d91871 SPIGOT-6347: Nether Portals Default to Nether, even in Nether
8aa6a953f SPIGOT-5778: Added World.getGameTime method

Spigot Changes:
73fb6094 #107: Add async catching to chunk entity add/remove
2021-02-12 18:42:12 -05:00
Jason Penilla
79720eaf85 Merchant#getRecipes should return an immutable list (#5183)
This fixes a confusing issue where doing 'merchant.setRecipes(merchant.getRecipes());' would clear the merchants recipes, as the implementation of getRecipes is guavas Lists.transform wrapped in Collections.unmodifiableList, and the implementation of setRecipes clears the backing list before adding the elements of the provided list to the backing list.
The javadoc for the getRecipes method says 'an immutable list of trades', so this patch makes the javadoc correct.
2021-02-10 15:06:34 -08:00
Shane Freeder
93ff88d6c8 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
e5cb519d #793: Don't unnecessarily toString block in CraftBlockEntityState constructor
2021-02-06 00:02:44 +00:00
Shane Freeder
9c04c8c390 Updated Upstream ()
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
2021-02-06 00:00:18 +00:00
Mariell Hoversholm
0677694e78 Updated Upstream (CraftBukkit/Spigot) (#5169) 2021-02-05 23:52:27 +01:00
Yannick Lamprecht
c07b432618 living entity allow attribute registration (#4723) 2021-02-05 23:14:27 +01:00
Gergely Sarkozi
8597a42d37 fix calling setSize on dead slimes causing invincibility (fixes #5137) (#5168) 2021-02-05 22:24:45 +01:00
Aleksander Jagiello
3b47c76275 Add getMainThreadExecutor to BukkitScheduler 2021-01-28 21:01:25 +01:00
BillyGalbreath
cf323f5eaa Allow adding items to BlockDropItemEvent (#5093) 2021-01-30 10:09:13 -06:00
Andrew Steinborn
2f5eaee571 Inline shift fields in EnumDirection (#5082) 2021-01-30 10:40:34 -05:00
Lukas Alt
0718db9f9a added option to disable pathfinding updates on block changes (#5123) 2021-01-30 16:34:38 +01:00
Gergely Sarkozi
26d832041b add DragonEggFormEvent (fixes #5110) (#5112) 2021-01-30 16:22:12 +01:00
Nassim Jahnke
8c0bedeefc Add dropLeash variable to EntityUnleashEvent (#5130) 2021-01-30 14:23:15 +01:00
BillyGalbreath
3ad49543fd EntityMoveEvent (#4614) 2021-01-28 13:26:20 -06:00
Jake Potrebic
89e37e5701 Updated Upstream (CraftBukkit/Spigot) (#5119)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
c3e684ef SPIGOT-3789: Can't Remove Entity Equipment in Same Tick Spawned without using Consumer

Spigot Changes:
89d6047d Rebuild patches
2021-01-26 20:22:32 -08:00
Yive
5aad4e59c9 Reset shield blocking on dimension change 2021-01-24 08:57:16 -08:00
Beech Horn
0ce0eaf3eb Skip distance map update when spawning is disabled 2020-02-14 19:47:05 +00:00
Jake Potrebic
a797fca1b9 Added PlayerStonecutterRecipeSelectEvent
Co-Authored-By: MiniDigger | Martin <admin@minidigger.dev>
2020-11-27 17:15:15 -08:00
HexedHero
6be762e8dd Add toggle for always placing the dragon egg 2020-11-26 12:11:05 +00:00
Jake Potrebic
637562df58 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
e70a125f #571: Expand the FishHook API

CraftBukkit Changes:
0bad58f1 #783: Expand the FishHook API
3636fb51 SPIGOT-6318: Fix smoke effect directions
2021-01-22 21:23:36 -08:00
Matthew Miller
baeb3a378d Add BlockPreDispenseEvent (#5075) 2021-01-20 08:55:25 +10:00
Andrew Steinborn
637e21957f Correctly skip pathfinder ticks for inactive entities (#5085)
Fixes #5083
2021-01-19 17:51:14 -05:00
HexedHero
bf5118006b Fix console spam when removing chests in water 2020-11-19 02:13:58 +00:00
Jake Potrebic
f3a0cb334c Add PlayerChangeBeaconEffectEvent
Signed-off-by: MiniDigger | Martin <admin@minidigger.dev>
2021-01-17 21:21:31 +01:00
Jake Potrebic
d15c9fa319 added Wither API 2020-07-05 15:41:43 -07:00
Jake Potrebic
42bf970756 Added Vanilla Entity Tags 2021-01-03 20:04:29 -08:00
Jake Potrebic
747df59714 fix NPE in getDisplayNameComponent 2021-01-05 10:43:26 -08:00
Jake Potrebic
98b98a8c27 Configurable max leash distance 2021-01-03 21:04:46 -08:00
Jason Penilla
6a84ae3d30 Do not add passengers of entities that were above save limit (#5073)
Co-authored-by: Spottedleaf <spottedleaf@spottedleaf.dev>
2021-01-16 16:05:33 -08:00
Aikar
8206c325a2 Remove class 13 from netty preload - Fixes #5066
We apparently were mixing netty versions before, and 13 was removed from netty 4.1.50
but when cat fixed a bug in our pom in 1.16.5 it fixed the mixed versions issue.
2021-01-16 14:36:27 -05:00
Aikar
fe7ff11c9f Make ProjectileHitEvent Cancellable
Allows cancelling things like detonating TNT from Fire Arrows
2021-01-16 14:31:14 -05:00
Jake Potrebic
00664f31de make schedule command per world 2021-01-04 19:53:36 -08:00
CDFN
91e25d490a Return chat component with empty text instead of throwing exception. Fixes #3328
Signed-off-by: MiniDigger | Martin <admin@minidigger.dev>
2021-01-16 20:10:42 +01:00
Mariell Hoversholm
03168769b9 Collision option for requiring a player participant
Closes #614.
2020-11-14 16:49:03 +01:00
dfsek
6a7a138ca4 Add StructureLocateEvent
Signed-off-by: MiniDigger | Martin <admin@minidigger.dev>
2021-01-16 18:21:05 +01:00
Mariell Hoversholm
08145dcb9d Add sendOpLevel API 2020-12-29 15:04:24 +01:00
Shane Freeder
4e38844029 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
85b16b8a Update to Minecraft 1.16.5

CraftBukkit Changes:
f3f30947 Update to Minecraft 1.16.5

Spigot Changes:
018b9a0d Update to Minecraft 1.16.5
2021-01-16 02:18:08 +00:00
Jason Penilla
9db95fbc63 Improve zombie villager curing exploit fix (#5054)
Instead of completely resetting a Villager's reputation for all players each time they are cured, we now only reset the relevant part of the reputation for only that player. This means the exploit is fixed and players cannot stack multiple cures until prices are down to 1, but doesn't have the same side effects that are commonly complained about with the current exploit fix.
2021-01-15 09:40:10 -08:00
Shane Freeder
7d3b9c9bc0 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
7a6c3c9a Remove outdated build delay.
2021-01-15 16:28:53 +00:00
Shane Freeder
2da0e4a287 EntityLoadCrossbowEvent#shouldConsumeItem 2021-01-14 15:53:42 +00:00
Jason Penilla
e1e887ac1e Add a config option to limit the number of entities of each type to load/save in a chunk (#4792) 2021-01-13 16:04:51 -08:00
Shane Freeder
8bd708eac7 Move logic from last patch into correct place 2021-01-13 21:31:51 +00:00
Shane Freeder
ccd254077b disable entity ticking flag after watchdog obliteration 2021-01-13 21:29:05 +00:00
Jake Potrebic
f3cfe62211 Updated Upstream (Bukkit/Spigot) (#5048)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
bf617659 SPIGOT-6313: Revert "SPIGOT-6274: Reloading configuration does not clear previous values"
e8fa7a07 SPIGOT-6274: Reloading configuration does not clear previous values

Spigot Changes:
5fc0fb4e SPIGOT-6306: Handle watchdog reloads and disabling by 0/negative times
2021-01-12 12:06:27 -08:00
Jason Penilla
c762d416c5 Fix villager boat exploit (#5047) 2021-01-11 13:23:11 -08:00
Shane Freeder
630fa37394 Properly track block update flags (actually fixes #5038) 2021-01-11 19:08:03 +00:00
Shane Freeder
2b06877898 Fix debug stick update suppression (Fixes #5038) 2021-01-11 16:45:37 +00:00
Josh Roy
23c21fc4bf Fix dumpitem command not checking sender (#5025) 2021-01-10 20:49:50 -05:00
Shane Freeder
c92072e21d nerf nether search radius config (#4781) 2021-01-11 01:44:06 +00:00
Shane Freeder
8a917b49f4 clone POI blockpos before dispatching 2021-01-10 18:36:38 +00:00
Aikar
1105e1ec76 Optimize Loaded Chunks Cache Lookups
Reduces number of instructions a chunk lookup does
when accessing the last chunk cache. This reduces amount of work and opcodes
and allows better inlining.

In lots of profiling comparisons, this optimization was able to reduce the
cost of repeated chunk lookups that hit the cache pretty significantly.
2021-01-09 18:09:09 -05:00
Shane Freeder
442fa32443 Ensure POI removal occurs on the correct thread 2021-01-09 13:32:26 +00:00
Shane Freeder
3a358f7e70 Remove stale POIs 2021-01-09 14:19:17 +01:00
Prof-Bloodstone
f11f1f32f5 Remove patch for not searching for portal creation when looking down (#5031)
Previous commit bb02d0383 pulled upstream change that implements the exact same fix.

CB change: 7029c0a8f3

Co-authored-by: Professor Bloodstone <git@bloodstone.dev>
2021-01-09 12:28:28 +01:00
Matthew Miller
728fb4ecd4 Add API to get exact interaction point in PlayerInteractEvent (#4995) 2021-01-08 15:26:51 +10:00
Mariell Hoversholm
f463a0b97c Empty commands shall not be dispatched
Fixes PaperMC/Paper#5018.
2021-01-06 23:41:42 +01:00
Jake Potrebic
1b82f95755 Configurable door breaking difficulty 2021-01-03 22:28:18 -08:00
lukas81298
161726557c don't search for portal creation when looking down 2021-01-05 15:14:35 +01:00
Shane Freeder
bc2999f578 Print name of busted server config files 2021-01-05 11:21:03 +00:00
Jake Potrebic
fb045c7249 Added PlayerLoomPatternSelectEvent 2020-11-25 16:37:34 -08:00
Ivan Pekov
6eeef75460 Reimplement GS4QueryEvent 2020-12-09 09:21:19 +02:00
Jake Potrebic
4048b356d0 Added PlayerLecternPageChangeEvent 2020-11-23 12:59:17 -08:00
TheViperShow
5e08466cc1 Add BlockFailedDispenseEvent
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
2020-11-29 00:38:52 +01:00
Jake Potrebic
3ca5850362 Added world settings for mobs picking up loot 2020-11-28 18:46:44 -08:00
Jake Potrebic
d2e5086e43 Added ServerResourcesReloadedEvent 2020-12-02 20:05:09 -08:00
Jake Potrebic
d37d042ff1 colorful itemdump 2020-12-07 18:10:22 -08:00
Jake Potrebic
1c87fa89f9 Added WorldGameRuleChangeEvent 2020-12-20 16:42:33 -08:00
HexedHero
3e15f5aabc Guardian beam workaround 2020-12-31 22:45:30 +00:00
Mariell Hoversholm
542d7df36b Support spawning item stacks 2020-11-14 19:11:20 +01:00
Jake Potrebic
d0f7408554 added height config for bamboo 2020-11-11 17:48:12 -08:00
Josh Roy
023ec47e68 Add EntityLoadCrossbowEvent 2020-10-07 12:04:42 -04:00
stonar96
0367dabcb2 Add Anti-Xray bypass permission
This is a frequently requested feature. The permission is
'paper.antixray.bypass'.
2020-08-07 08:11:56 +02:00
Jake Potrebic
96fc8c1353 fix for nerfed slime mobs splitting 2020-07-17 13:34:50 -07:00
Jake Potrebic
32f9130749 Zombie API - breaking doors 2020-11-18 11:33:29 -08:00
TheMolkaPL
7035d57399 Fix interact event not being called in adventure 2020-06-21 17:25:24 +02:00
MisterVector
428affde24 Add PlayerFlowerPotManipulateEvent 2019-08-13 21:47:06 -07:00
Andrew Steinborn
bd0e8d65a8 Redact Velocity forwarding secret properly (#4980) 2021-01-01 23:59:30 -05:00
BrodyBeckwith
8902bc3512 Allow disabling mob spawner spawn egg transformation 2020-10-09 20:35:57 -04:00
lukas81298
0e12991f69 Cache burn durations 2020-12-27 23:00:27 +01:00
lukas81298
3f56fafda8 Optimized tick ready check 2020-12-29 14:14:43 +01:00
Matthew Miller
fffed3cf0a Add API to get the Material of Boats and Minecarts 2020-12-31 12:51:43 +10:00
Mariell Hoversholm
5a8ce7f006 Fix sign lazy initialisation
Fixes PaperMC/Paper#4975
2021-01-01 14:35:38 +01:00
Jake Potrebic
e11560e965 Updated Upstream (CraftBukkit/Spigot) (#4972)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
560b65c4 #707, SPIGOT-5063, SPIGOT-5304, SPIGOT-5656, SPIGOT-3206, SPIGOT-5350, SPIGOT-5980, SPIGOT-4672: Persist the exact internal text representation where possible.

Spigot Changes:
ff439d1e Rebuild patches
2020-12-31 20:03:19 -08:00
PepperCode1
2e7b860b56 Fix harming potion dupe
EntityLiving#applyInstantEffect() immediately kills the player and drops their inventory.
Before this patch, instant effects would be applied before the potion ItemStack is removed and replaced with a glass bottle. This caused the potion ItemStack to be dropped before it was supposed to be removed from the inventory. It also caused the glass bottle to be put into a dead player's inventory.
This patch makes it so that instant effects are applied after the potion ItemStack is removed, and the glass bottle is only put into the player's inventory if the player is not dead. Otherwise, the glass bottle is dropped on the ground.
2020-07-23 14:29:02 -07:00
Aikar
8147d0ec71 Additional Block Material API's
Faster version for isSolid() that utilizes NMS's state for isSolid instead of the slower
process to do this in the Bukkit API

Material#isSolid uses a large switch statement which isn't as performant vs a simple boolean return

Adds API for buildable, replaceable, burnable too.
2020-12-30 19:43:45 -05:00
Aikar
eee1fedc1e Micro Optimize DataBits
There was 2 unnecessary lines of code in a core method used for DataBits
that repeatedly calculated a static value.

We now just precalculate that in the constructor and reuse the value instead.

This is a micro optimization, but this is some of the hottest code in the server so
it should provide some minor gains as well as improve inlining.

Additionally, to further help inlining, mark the DataBits methods as final.
2020-12-30 14:02:44 -05:00
Jason Penilla
b9744db06b Add and implement cancellable TargetHitEvent for when Target Blocks are hit by Projectiles 2020-11-26 00:30:08 -08:00
Jake Potrebic
93a75a9588 Add OBSTRUCTED result to BedEnterResult enum 2020-12-24 12:44:34 -08:00
Automated
0c40a013dd [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-12-28 07:11:59 -05:00
Jake Potrebic
43a4ab7b04 added PlayerTradeEvent 2020-07-02 16:14:36 -07:00
Shane Freeder
25980711f0 Do not crash from invalid ingredient lists in VillagerAcquireTradeEvent 2020-12-27 11:31:49 +00:00
Toshimichi0915
cfebf1baa7 Fix lead duplication 2020-12-25 01:31:13 -05:00
Matthew Miller
cfd2fcf443 Add API to get Tile Entities in a Chunk by Predicate 2020-12-18 21:24:21 +10:00
Jake Potrebic
5583c8c007 fix book page limit length (#4932) 2020-12-23 14:52:56 -08:00
Mark Vainomaa
ec665f60d2 Expose LivingEntity hurt direction 2020-12-22 22:32:15 +01:00
Shane Freeder
08f196719f Do not perform neighbour updates when using debug stick (Fixes #2134)
CB blindly drops any update flags when recording block modifications,
this causes the debug stick to blindly update neighbouring blocks on usage
in order to control this, we will special case this item, however, this
ideally should be fixed by recording the actual update flags used,
but will induce ABI breaks...

This patch also maintains the behavior of the BlockPlaceEvent, this
behavior will NOT be guaranteed in the future, however.
2020-12-22 22:45:10 +00:00
Aikar
319895bd9d Optimize Dynamic#get Missing Keys
get was calling toString() on every NBT object that was ever asked for an optional
key from the object to build a string for the error text.

When done on large NBT objects, this was using a ton of computation time building the
JSON representation of the NBT object.

Now we will just skip the value when 99.9999% of the time the text is never even printed.
2020-12-21 11:03:36 -05:00
Shane Freeder
49458cc927 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6f9fe1d9 #562: Add API to set equipment silently
bcddb754 SPIGOT-6256: Add method to check if the entity is in water

CraftBukkit Changes:
878b4375 #772: Add API to set equipment silently
22d7fcc9 SPIGOT-6256: Add method to check if the entity is in water
2020-12-21 07:56:22 +00:00
Bastian Oppermann
fdaae06cdf Adjust bStats data sending delay (#4914)
Many servers tend to restart at a fixed time at xx:00 which causes an
uneven distribution of requests on the bStats backend. To circumvent
this problem, this commit introduces some randomness to the initial
and second delay.
2020-12-20 16:41:00 +01:00
Simon Gardling
3ce9dfed51 Fix typo in 0368-Asynchronous-chunk-IO-and-loading.patch 2020-12-17 19:24:11 -05:00
BillyGalbreath
c7c5f0241b Fix CraftSound backwards compatibility 2020-12-17 15:28:31 -06:00
MiniDigger | Martin
6c95759a00 Let some more packets be send immediately, closes #4140 (#4896)
Signed-off-by: MiniDigger | Martin <admin@minidigger.dev>
2020-12-16 23:16:03 +01:00
cakoyo
7a84defae4 Emancipate more features to PlayerHandshakeEvent
* The hostname and socket address was not null when the event fired, but the event does not provide the value, the change allows plugins to use the old value.
* Since `proxyLogicEnabled` will be checked after the event fired, to check the config value will allow plugins to modify it during the event handling.

Signed-off-by: MiniDigger | Martin <admin@minidigger.dev>
2020-12-16 21:43:09 +01:00
ysl3000
11a4045767 Player Chunk Load/Unload Events
Co-authored-by: Mariell <proximyst@proximyst.com>
2020-10-31 23:06:21 +01:00
BillyGalbreath
3e5a38ccf5 MC-4 Fix item position desync 2020-12-14 09:05:29 -06:00
Shane Freeder
c184de4050 Limit auto recipe packets 2020-12-12 23:53:40 +00:00
BillyGalbreath
6ce7d63918 Fix curing villager makes equipment disappear 2020-12-08 22:21:54 -06:00
Shane Freeder
c81621d172 Tick inactive goal selectors 2020-12-09 20:31:08 +00:00
MiniDigger | Martin
62c0f6553e fix 4878 by always calling events using bukkit singleton 2020-12-09 21:09:54 +01:00
BillyGalbreath
896033a959 Fix MC-181190 curing zombie villager discount exploit (#4871) 2020-12-08 21:56:22 -06:00
Jake Potrebic
8c473e7fcd deprecate IllegalPacketEvent (#4867) 2020-12-07 23:51:55 -08:00
William Blake Galbreath
d6057372b4 Add #getEligibleHumans to SkeletonHorseTrapEvent 2020-08-23 21:57:55 +02:00
Mariell Hoversholm
889192e8f8 Fix merging spawning values 2020-12-05 14:59:05 +01:00
Jake Potrebic
43d8c6fcd4 Turn off spigot verbose world by default 2020-12-02 20:20:59 -08:00
MiniDigger | Martin
7e7a3d372a Fix Delegation to vanilla chunk gen
This broke in 1.16.1, when upstream changed stuff around and introduced this delegate field.

Closes #4097
2020-11-24 18:58:34 +01:00
Jake Potrebic
1023360683 fixed bug in jvm checker (#4845) 2020-12-04 19:58:24 -08:00
Kyle Wood
08835cda45 Enable Multi-Release plugin jar support
Fixes #4841
2020-12-04 15:57:46 -08:00
Automated
256a700c8d [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
5b747147e Increase outdated build delay
2020-12-03 03:37:01 -05:00
Kyle Wood
233273702f Add warning for servers not running on Java 11 2020-12-02 22:27:03 -08:00
Josh Roy
209f04eab2 Add PlayerShearBlockEvent 2020-08-27 15:39:24 -04:00
Jake Potrebic
e2da9f79e2 added missing default perms 2020-11-16 12:05:51 -08:00
Professor Bloodstone
c53e8d6220 Add summary to /paper chunkinfo command 2020-08-25 22:34:46 +02:00
William Blake Galbreath
427a4c9dd8 Climbing should not bypass cramming gamerule 2020-08-23 21:34:23 +02:00
MiniDigger | Martin
01fe745c90 Add legacy plugin count to metrics 2020-05-11 22:18:58 +02:00
Nassim Jahnke
7c3f274871 Add more lightning API 2020-07-26 14:46:14 +02:00
Nassim Jahnke
744cdf7512 Add PlayerItemCooldownEvent 2020-08-25 14:01:03 +02:00
Anrza
89bdd85933 Add LivingEntity#clearActiveItem 2020-07-15 12:11:31 +02:00
Esophose
7cb939e3a3 Fix Player spawnParticle x/y/z precision loss 2020-10-03 19:00:20 -06:00
Shane Freeder
2e2d31ae89 Fix keep-spawn-loaded stopping force-loaded chunks from loading
Also, cleanup the patch a little bit
2020-12-01 13:23:44 +00:00
Ineusia
14189f531d Add getDestroySpeed to Block API
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
2020-07-18 19:29:40 -05:00
Josh Roy
603d4bb5a6 Fix cast check (#4813) 2020-11-27 13:07:41 -05:00
Mark
8996aa88cd Expose world spawn angle (#4803) 2020-11-27 19:27:52 +02:00
Shane Freeder
036bb4e24a Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Actually rebuild patches this time...

Bukkit Changes:
19b7b7bd #561: Add clear weather World API
5929c808 #552: Add the ability to retrieve hit, step, fall, and other sounds from blocks.

CraftBukkit Changes:
e1ebdd92 #771: Add clear weather World API
424598d2 #752: Add the ability to retrieve hit, step, fall, and other sounds from blocks.
2020-11-25 23:49:06 +00:00
stonar96
2760588808 Preserve order and allow multiple equal blocks in hidden-blocks of Anti-Xray (#4072)
* Preserve order of hidden-blocks in Anti-Xray

This small change allows to specify and predict the order in which
Anti-Xray uses the hidden-blocks in engine-mode 2. The order is
preserved as specified in the hidden-blocks list. This can be useful,
for example, when adding air to the hidden-blocks to predict which fake
ores should be exposed to fake air.

* Allow to add equal blocks multiple times to hidden-blocks

This adds the ability to add equal blocks multiple times to the
hidden-blocks of Anti-Xray in engine-mode 2. Thus it is possible to give
certain blocks different priorities in Anti-Xray. For example if air and
diamond_ore are added twice, the obfuscated chunk will contain twice as
many air and diamond_ore blocks as other blocks in the list.
2020-11-24 17:59:04 +01:00
SuperCoder7979
72ea212bec Significantly improve performance of the end generation
This patch implements a noise cache for the end which significantly reduces the computation time of generation. This results in about a 3x improvement.

Original code by SuperCoder7979 and Gegy in Lithium, licensed under LGPL-3.0 (Source: https://github.com/jellysquid3/lithium-fabric)

Co-authored-by: Gegy <gegy1000@gmail.com>
Co-authored-by: Dylan Xaldin <Puremin0rez515@gmail.com>
Co-authored-by: pop4959 <pop4959@gmail.com>
2020-11-05 21:37:46 -06:00
Jason Penilla
9d76d7a887 Add Wandering Trader spawn rate config options 2020-09-23 10:28:11 -07:00
Jason Penilla
ca25d24197 Villager resetOffers API 2020-10-03 21:20:10 -07:00
Mariell Hoversholm
db1f178a92 Patch 2 references an invalid variable 2020-11-14 16:54:25 +01:00
Gabscap
5991698388 [CI-SKIP] Remove Waving banner fix (#4786)
Mojang fixed it in MC-63720
2020-11-19 16:15:16 +01:00
Jake Potrebic
ad0aae4e0f Updated Upstream (Bukkit/CraftBukkit) (#4779)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f47abd88 SPIGOT-6242: Fix some file line endings
de96535b SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable

CraftBukkit Changes:
4475707d SPIGOT-6244: /spawnpoint ignores angle
8b3b096d SPIGOT-6242: Fix some file line endings
4b33c749 SPIGOT-6186: Canceling a CreatureSpawnEvent​ results in a "Unable to summon entity due to duplicate UUIDs" error
2b3ca726 SPIGOT-6236: Vehicle passenger portal cooldown does not change
2020-11-17 19:45:18 -08:00
Max Lee
217e1311f4 Backport feature search improvement from 1.17 (Fixes #2312) (#4771) 2020-11-14 23:50:11 +01:00