Commit graph

88 commits

Author SHA1 Message Date
Aikar
133396a0c9 Configurable Alternative LootPool Luck Formula
Rewrites the Vanilla luck application formula so that luck can be
applied to items that do not have any quality defined.

See: https://luckformula.emc.gs for data and details
-----------

The rough summary is:
My goal was that in a pool, when luck was applied, the pool
rebalances so the percentages for bigger items is
lowered and smaller items is boosted.

Do this by boosting and then reducing the weight value,
so that larger numbers are penalized more than smaller numbers.
resulting in a larger reduction of entries for more common
items than the reduction on small weights,
giving smaller weights more of a chance

-----------

This work kind of obsoletes quality, but quality would be useful
for 2 items with same weight that you want luck to impact
in varying directions.

Fishing still falls into that as the weights are closer, so luck
will invalidate junk more.

This change will result in some major changes to fishing formulas.

-----------

I would love to see this change in Vanilla, so Mojang please pull :)
2018-06-15 00:32:35 -04:00
Kyle Wood
fdc7459143 Handle gpg signing better (#1123)
Instead of checking whether it was set previously, setting it to false,
then setting it back to true if it was true before, just use the
command-line argument in git to override the config for that command.
Using a variable makes it pretty painless to do.
2018-05-24 13:41:50 -05:00
Zach Brown
cf82968f35 Apply workaround for patch application on Windows (#1122)
This is not a perfect workaround but it seems to be the best solution
for the moment.

On Windows, this means that when a patch fails to apply, you would now
need to fix that patch, finish the apply (AM), then rebuild all patches,
and then finally re-run the patch apply procedure in order to continue.

This adds a small amount of overhead compared to the traditional method
(which will still work on *nix environments, including WSL). However, it
seems preferable to the build not working on Windows at all.
2018-05-16 20:41:10 -05:00
Aikar
9b4be61ac6 WitchConsumePotionEvent
Fires when a witch consumes the potion in their hand
2018-05-16 20:35:33 -04:00
Minecrell
99efa104db Call PaperServerListPingEvent for legacy pings (#1057)
* Make the legacy ping handler more reliable

The Minecraft server often fails to respond to old ("legacy") pings
from old Minecraft versions using the protocol used before the switch
to Netty in Minecraft 1.7.

Due to packet fragmentation[1], we might not have all needed bytes
available when the LegacyPingHandler is called. In this case, it will
run into an error, remove the handler and continue using the modern
protocol.

This is unlikely to happen for the first two revisions of the legacy
ping protocol (used in Minecraft 1.5.x and older) since the request
consists of only one or two bytes, but happens frequently for the
last/third revision introduced in Minecraft 1.6.

It has much larger, variable packet sizes due to the inclusion of
the virtual host (the hostname/port used to connect to the server).

The solution[2] is simple: If we find more than two matching bytes,
we buffer the remaining bytes until we have enough to fully read and
respond to the request.

[1]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h3-11
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13

* Add legacy ping support to PaperServerListPingEvent

Add a new method to StatusClient check if the client is a legacy
client that does not support all of the features provided in the
event.
2018-03-30 19:00:01 +02:00
Minecrell
5336a6b6bb Add extended PaperServerListPingEvent (#980)
* Drop original implementation for old player sample API

* Add extended PaperServerListPingEvent

Add a new event that extends the original ServerListPingEvent
and allows full control of the response sent to the client.

* Implement deprecated player sample API
2018-03-23 04:19:59 +01:00
Aikar
feaa8460b1 Fix Dragon Server Crashes
If the dragon tries to find "ground" and hits a hole, or off edge,
it will infinitely keep looking for non air and eventually crash.
2018-03-21 20:51:12 -04:00
Kyle Wood
b2eb1e7f00 Use a more general method of aliasing md5sum
Rather than checking the platform or operating system, simply check if
the command exists. If the check fails, check if the md5 command exists.
If that fails as well, cancel the build script. Otherwise, assign the
alias as before.
2018-02-23 18:58:45 -06:00
ShelLuser
f512fe2faa This patch allows Paper to be build on FreeBSD using the paper script. FreeBSD also doesn't have md5sum and uses md5, just like OS X. As such I added an extra check for the presence of FreeBSD. 2018-02-22 11:43:31 +01:00
Nikita Rudy
9105e06867 Added options to disable additional ore generation in Mesa and Extreme Hills (#1006) 2018-02-13 03:44:50 +03:00
Aikar
c3791a5225 Ability to apply mending to XP API
This allows plugins that give players the ability to apply the experience
points to the Item Mending formula, which will repair an item instead
of giving the player experience points.

Both an API To standalone mend, and apply mending logic to .giveExp has been added.
2017-12-20 17:50:26 -05:00
Shane Freeder
21e410d42e [CI-SKIP] Fix apatch zsh support 2017-12-20 13:17:32 +00:00
Aikar
036910d741 add latest copy of my apatch to the repo for easy access 2017-12-09 12:37:31 -05:00
Aikar
41afad51da Improve Structures Checking
Improves performance by keying every chunk thats part of a structure to a hashmap
instead of only the first one.

This allows us to avoid iterating the entire structures value set to see
if a block position is inside of a structure.

This should have pretty decent performance improvement to any standard world
that has been around for a whilewith lots of structures due to ineffeciencies
in how MC stores structures (even unloaded chunks has structured data loaded)
2017-11-11 18:47:30 -05:00
Zach Brown
9650c9dddc Add Obfuscation helper for armor change impl
Also alphabetize the importmcdev script... heathens, all of you
2017-11-11 00:07:45 -05:00
Zach Brown
689fdea2c7 Add command for listing entities in a world
Port of 303a775fc3

Will display a list of all entities in a world, as well as which chunks
they are in. Hopefully, this will make tracking down chunks with lots of
entities easier.

Only real change from the forge version is that instead of dimension
IDs, we accept world names in the form of a string.

/paper entity list - Lists all entities in the player's current world
/paper entity list minecraft:zombie - Lists all zombies in the player's
current world

/paper entity list * world_nether - Lists all entities in the nether
/paper entity list minecraft:ghast world_nether - Lists all ghasts in
the nether
2017-10-15 17:43:16 -04:00
stonar96
3a9f17bc4b Anti Xray v2 (#858) 2017-10-05 14:38:21 +01:00
DemonWav
f29c81c414 Add clean command and fix critical script issue 2017-09-28 17:52:05 -05:00
DemonWav
60f643684a Use absolute paths for pointing Paperclip to files 2017-09-23 13:30:55 -05:00
DemonWav
81d69d5889 Move eclipse compiler patch to POM changes patch
Also update to Paperclip 1.1-SNAPSHOT
2017-09-23 13:17:20 -05:00
Zach Brown
7a4c06e567 Update paperclip script for folder move 2017-08-13 15:44:27 -05:00
Zach Brown
67f96885aa Move mc decompile source to its own folder
Makes caching easier, ever so slightly more organized.
2017-08-12 18:56:59 -05:00
Zach Brown
b8cda19a77 Fix MC-117075: TE Unload Lag Spike
PaperMC port of https://github.com/MinecraftForge/MinecraftForge/pull/4281
2017-08-09 18:11:57 -05:00
Zach Brown
b39f2133a1 Update Paper to MC 1.12-pre5 2017-05-20 23:41:39 -05:00
Aikar
f73ec445b6 Update test server JVM flags. Bad me not even using my own flags! 2017-05-17 22:51:42 -04:00
Zach Brown
ab4ae72fd5 Update to MC 1.12-pre2 2017-05-14 13:05:01 -05:00
Aikar
7daac312a5 Shame on you Mojang
Someone wrote some horrible code that throws a world accessing task
onto the HTTP DOWNLOADER Thread Pool, for an activity that is not even
heavy enough to warrant async operation.

This then triggers async chunk loads!

What in the hell were you thinking?
2017-02-05 19:19:35 -05:00
Aikar
36ce1b950a Add more timings to Scheduler and other improvements 2017-02-05 00:13:16 -05:00
Zach Brown
21a724147a Do not allow a zero max height in BiomeJungle
Fixes GH-592

Thanks to the forge team who noticed this issue long ago
2017-01-23 15:11:07 -06:00
Zach Brown
ce10eb73f0 Assign the World in WorldGenStronghold
Fixes GH-580
2017-01-14 01:24:11 -06:00
Aikar
9db5f4c20a New Firework API's
Get the launcher of a Firework and who it is boosting
2016-12-28 02:25:35 -05:00
Aikar
3967ce4cb3 Activation Range Improvements
Fixes and adds new Immunities to improve gameplay behavior
2016-12-28 00:19:58 -05:00
Aikar
498c673952 Change default Debugging port to avoid conflicts 2016-12-27 16:12:39 -05:00
Zach Brown
4bfa933c52 Cleanup 'nerfed spawner mobs can float' patch 2016-12-20 21:57:07 -06:00
Zach Brown
b21c31c91d Update upstream B/CB 2016-12-09 18:07:35 -06:00
Aikar
e5b4e80232 Ignore "Unable to resolve BlockEntity" debug messages - Fixes #489 2016-12-02 00:02:18 -05:00
Mark Vainomaa
676d0e8bcf Fix building when directory with spaces is used 2016-11-20 23:58:20 +02:00
Zach Brown
2b8aa1a8f2 Simplify the affects spawning API implementation
Get the hell away from EntitySelectors, not that that one right anyway
Fixes GH-482
2016-11-18 18:55:14 -06:00
Zach Brown
4832b1a385 Update Paper to MC 1.11 2016-11-16 20:23:38 -06:00
Zach Brown
513118af55 Filter bad data from ArmorStand and SpawnEgg items
Fixes GH-478
2016-11-12 23:29:32 -06:00
Zach Brown
8fd92641f7 Remove log redirection in CB init script
This section seems to be a relatively common source of errors. We may as well be as
verbose as the command output, at least for this section.
2016-11-11 13:57:09 -06:00
Zach Brown
ca7a828688 Update upstrean CB/S 2016-09-11 14:55:02 -05:00
Zach Brown
4dcb73693a Add rate limiting to PacketPlayInUseItem as well
Also removes our toggle for Spigot's option, I doubt anyone uses it.
2016-09-10 21:42:47 -05:00
Zach Brown
89b26bb90d Commit CB changes as "Auto"
Helps when using git's annotate function
2016-09-10 21:31:32 -05:00
Aikar
f919bc9732 fix order of mc dev imports 2016-08-30 18:54:03 -04:00
killme
755861dfb6 Disable ticking of snow blocks 2016-08-30 16:42:17 +02:00
Zach Brown
2bf8ae3251 Add upstreamMerge script to paper tool 2016-08-19 16:00:59 -05:00
Alfie Cleveland
3820e163d4 Optimise BlockStateEnum 2016-08-19 01:53:36 +01:00
Zach Brown
96e8a799b4 Push based hoppers cleanup 2016-07-22 18:54:48 -05:00
Zach Brown
98c7a31d79 Stop overwriting block locations, root issue looks to be the TE fixer itself
Fixes GH-352
2016-06-26 18:38:39 -05:00