Commit Graph

703 Commits

Author SHA1 Message Date
md_5
753a8e700d SPIGOT-3324: Improve tameable damage handling 2017-06-24 10:01:46 +10:00
md_5
763827668e SPIGOT-3368: Allow anvil level cost to be overwritten by properties 2017-06-23 20:35:17 +10:00
md_5
5e2a23055e SPIGOT-3364: Correct EntityResurrectEvent 2017-06-23 12:47:29 +10:00
md_5
03f1e37ae2 Fix nether world border center not adjusting 2017-06-18 19:23:33 +10:00
md_5
a7d074c6c0 SPIGOT-3329: Allow per world loot tables 2017-06-15 20:34:19 +10:00
md_5
732911efbc SPIGOT-3337: Use special data value to indicate multiple recipe choices 2017-06-15 07:23:08 +10:00
Jacob Martin
f7d14f184d Fix detection of missing or invalid tile entities for End portals and gateways 2017-06-12 12:41:18 -05:00
md_5
ec47e791bd SPIGOT-3328: EntityTameEvent for Parrots 2017-06-12 07:27:34 +10:00
md_5
202da9777d SPIGOT-3324: Best effort fix for shoulder Parrots + cancelled damage event 2017-06-11 12:20:18 +10:00
md_5
639aa0cf48 SPIGOT-3320: Apply tile entity fixer to more types 2017-06-11 08:32:29 +10:00
md_5
ed8c725d19 SPIGOT-3304: Respect duration from Vanilla /weather 2017-06-09 16:17:08 +10:00
md_5
2c34c38d7a SPIGOT-3303: Warn when attempting to grant non existent recipe 2017-06-09 16:13:35 +10:00
md_5
1b3122eef1 SPIGOT-3302: Armor stands not dropping armor 2017-06-09 15:51:56 +10:00
md_5
bb4ae3b3b8 Update to Minecraft 1.12 2017-06-08 18:00:00 +10:00
chickeneer
fe3ca95c76 Prevent NPE when setting tempt target to null 2017-06-04 08:43:00 +10:00
md_5
10daedccdd Add proper TeleportCause for /teleport 2017-06-04 08:39:36 +10:00
md_5
9a032b246b SPIGOT-3290: /teleport command overrides player rotation 2017-06-04 08:34:52 +10:00
md_5
701b06494d SPIGOT-3286: Call BlockFormEvent for Concrete Powder -> Concrete 2017-06-03 17:39:03 +10:00
md_5
e13d119686 Update to Minecraft 1.12-pre6 2017-05-30 21:55:13 +10:00
Scetra
ccc420a957 Add support for preventing block drops in BreakEvent 2017-05-28 17:08:28 +10:00
md_5
c037fe3d44 Add color API for Teams 2017-05-28 11:00:02 +10:00
Pokechu22
44dd60ac27 SPIGOT-3272: Fix duplicate creative inventory
This change properly identifies the creative inventory as one with 5 crafting slots (as that's the default set in ContainerPlayer, and handled properly in other containers), instead of having the same inventory twice (which breaks slot identification).
2017-05-28 10:32:31 +10:00
MiniDigger
274304b8ca SPIGOT-439: Add player locale related APIs. 2017-05-27 19:06:28 +10:00
md_5
a479029a85 Ensure gameLoop function gets selectors applied. 2017-05-26 16:43:56 +10:00
md_5
c7920f4302 SPIGOT-3257: Issue with AdvancementRewards function 2017-05-21 10:28:07 +10:00
md_5
24147056e0 SPIGOT-3258: VehicleBlockCollisionEvent only fires in certain directions 2017-05-21 10:24:47 +10:00
md_5
cda27c992d SPIGOT-3254: Check chunks are loaded before ticking entities as per previous versions. 2017-05-20 11:28:38 +10:00
md_5
1004352990 Update to Minecraft 1.12-pre5 2017-05-19 21:00:13 +10:00
md_5
45102fcf28 Misc advancement / recipe reload fixes including SPIGOT-3240 2017-05-16 21:22:07 +10:00
md_5
68b0515b51 SPIGOT-3243: Remove recipe reset on world change / death 2017-05-15 18:11:48 +10:00
md_5
913c5a61f7 SPIGOT-3242: Fix rain not showing client side 2017-05-15 15:01:05 +10:00
md_5
5195487ec6 Update to Minecraft 1.12-pre2 2017-05-14 12:00:00 +10:00
md_5
fcc5dcce54 SPIGOT-3235: Disconnect for payload errors 2017-05-14 09:25:25 +10:00
BlackHole
fbb47e8383 SPIGOT-3215: Call BlockPhysicsEvent for tall plants 2017-05-01 19:49:37 +10:00
Matthew
d9d7552262 Implement getColor / setColor for Shulker entity 2017-04-30 09:54:34 +10:00
Pokechu22
a2af8f0a73 SPIGOT-3207: Fix hiding players in a BukkitRunnable after joining
This happened because "joining" wasn't cleared until the player was ticked.  Runnables (presumably) ran _after_ the player list packet was sent, but before the player was ticked; thus, the player list packet was sent, but not cleared.  The fix is to replace joining with hasSentListPacket, which is set immediately before sending any player list packets (thus, if hidePlayer is called after, it sees that the list packet has been sent and sends a new one to reset it).  With this fix, the player is added to the list and then removed shortly afterwards.

The reason why running /hideall in the example wouldn't fix the invisibility is because the server already thinks the player's been removed from the list (as they're hidden), and thus doesn't want to send another hide packet.  This is correct behavior assuming that they get hidden correctly the first time, which they now do.
2017-04-28 15:27:57 +10:00
Geoff Crossland
6194f6cc49 Drop RegionFile.chunkExists() in favour of Mojang's own version 2017-04-27 21:25:33 +10:00
Matthew
55a1f9ff12 Implement getColor / setColor for TippedArrow 2017-04-26 20:28:27 -04:00
md_5
2453830549 Reset player arrow count on death 2017-04-26 15:56:06 +10:00
md_5
7b044defc0 Remove players from vehicle when changing world via NMS methods. 2017-04-21 14:56:41 +10:00
md_5
0ab698655b SPIGOT-3192: Return default value for invalid map icons 2017-04-21 08:20:49 +10:00
md_5
1c3428e534 Add small throttle to book edits. 2017-04-20 22:10:31 +10:00
md_5
be9ef980b9 Implement cooldown API 2017-04-19 18:04:32 +10:00
Pokechu22
1ac133ecc5 SPIGOT-3182: Fix tab-completion in command blocks without leading slash 2017-04-13 17:57:47 -07:00
Jacob Martin
d219213e2b Fixes to mob equipment behaviour
* Set correct flag for CanPickUpLoot on NBT load
* Drop previous equipment on mob equipment pickup
2017-04-09 11:45:37 +10:00
md_5
1f6c04c0f4 SPIGOT-3165: Only increment spawncount when mob spawn succeeds 2017-04-06 21:31:27 +10:00
md_5
41a7d14f8c SPIGOT-3162: Experience ignored for custom recipes 2017-04-03 09:06:42 +10:00
md_5
b5f7b6d69f SPIGOT-3157: Use Vanilla gamemode change code 2017-03-31 21:21:11 +11:00
md_5
7dd77d7340 SPIGOT-3154: Sleeping players cannot change dimensions 2017-03-30 21:53:23 +11:00
md_5
d09304e5db SPIGOT-3144: Add missing PrepareAnvilEvent call. 2017-03-25 09:51:02 +11:00
md_5
186c351a3a SPIGOT-3149: StructureGrowEvent for dispenser triggered growth 2017-03-24 21:03:44 +11:00
md_5
f4822eb93d Add additional methods sigs for binary compat 2017-03-24 15:23:23 +11:00
md_5
4959e46f53 Add TeleportCause.COMMAND for inbuilt /tp 2017-03-24 15:14:31 +11:00
md_5
31a852d619 SPIGOT-3142: Plugin event changes not using TeleportCause.PLUGIN 2017-03-24 15:09:34 +11:00
md_5
acf544e775 SPIGOT-3141: Missing TeleportCause.SPECTATE when lift clicking spectate 2017-03-24 15:08:19 +11:00
BlackHole
cf05cccd1b SPIGOT-3143: Don't decrease item stack size if VehicleCreateEvent is cancelled 2017-03-22 15:15:34 +11:00
md_5
257d6cd04f Process entity portalling towards the end of a tick.
Cross world teleportation works by taking a copy of an entity and moving it to a new world. After this happens the original entity is marked as dead so as to be removed from the original world, however it still undergoes one further tick in the main world, but with some information from the new world. It is not so easy to break out of this tick cycle if needed, so instead we move the portalling process towards the end of an existing tick. This ensures that the entity will not be spuriously ticked.
2017-03-20 15:41:15 +11:00
md_5
2aa5ac6c92 SPIGOT-3128: Shift VehicleCreateEvent calling. 2017-03-15 20:48:47 +11:00
md_5
251e4c9215 SPIGOT-3126: Make fireballs do a better job of respecting mobGriefing 2017-03-15 15:26:36 +11:00
md_5
2ad21b87f1 Ensure PlayerResourcePackStatusEvent is synchronous 2017-03-14 21:56:19 +11:00
Nathan Wolf
aa522c91a8 Add getIgnitingBlock to BlockBurnEvent 2017-03-11 17:22:12 +11:00
md_5
7a7c64714e SPIGOT-3107: Try and improve shield knockback further 2017-03-08 14:51:48 +11:00
md_5
cb44e932be SPIGOT-3105: BlockFadeEvent for large snow blocks 2017-03-08 14:24:11 +11:00
md_5
cb61ac0404 MC-111753, SPIGOT-2971: Brewing stand not reloading 2017-02-21 20:47:40 +11:00
md_5
64277ec9bc SPIGOT-3075: EntityTeleportEvent for Shulkers 2017-02-20 09:55:24 +11:00
md_5
1a710213df SPIGOT-3067: Wither skeleton heads not dropping 2017-02-15 10:11:41 +11:00
md_5
2683195ecd SPIGOT-3063: Call EntityAirChangeEvent 2017-02-14 10:34:56 +11:00
md_5
ed8a073298 SPIGOT-3044: BlockDispenseEvent for shulker boxes 2017-01-31 21:38:55 +11:00
md_5
80dd971b52 Make tile activeContainer assignment consistent. 2017-01-27 11:42:21 +11:00
md_5
16b5116c7c SPIGOT-3033: Alter behaviour of cancelled hopper transfers (reverted from commit 334aa07e2f) 2017-01-26 14:08:04 +11:00
md_5
334aa07e2f SPIGOT-3033: Alter behaviour of cancelled hopper transfers 2017-01-26 11:13:00 +11:00
md_5
46226d6a03 SPIGOT-3031: Pigs are not dropping their saddle 2017-01-24 13:39:22 +11:00
Pokechu22
4d3bf20155 Re-enable the vanilla debug MethodProfiler and /debug command
This is highly useful for profiling vanilla code, and in some cases plugin code.  It is somewhat expensive, though, which is why it was initially disabled.

I chose to use a system property instead of a configuration setting because 1) the MethodProfiler is exclusive to CraftBukkit and not part of the general API (the timings system is the general API equivalent), and 2) using a static final boolean property _may_ allow the JITter to optimize out the methods when disabled (though I'm not sure of it).

There are several changes to fix cases where the profiler code was broken slightly by other craftbukkit changes.  All of cases have been fixed, except for the block entity ticking one, due to the cost of the getSimpleName call.  For that, a ticking entry is used instead, so that time spent actually ticking the block entities can be compared with time processing the list.

This (effectively) reverts 7dde6cc566.
2017-01-18 17:42:35 -08:00
md_5
f709362074 SPIGOT-3002: Mob spawners are valid 2017-01-11 09:24:08 +11:00
md_5
27dd3ca45f SPIGOT-2997: Explicitly disallow invalid tiles to be opened 2017-01-10 09:56:20 +11:00
md_5
270755dc06 Fix crash if entities other than players (somehow?) consume their item. 2017-01-09 14:28:49 +11:00
md_5
d5e7885c2e SPIGOT-2990: EntityTeleportEvent for tameable animals following owner 2017-01-05 20:44:26 +11:00
md_5
c91863850d SPIGOT-2989: Use existing horse inventory object. 2017-01-05 15:03:22 +11:00
md_5
ce89845fda SPIGOT-1915: Fix players seeing their own passengers 2017-01-04 10:50:02 +11:00
md_5
63b5f7d338 More robust inventory handling 2017-01-04 10:04:27 +11:00
md_5
613be0d841 SPIGOT-2980: Improve SpawnEgg NBT application and ItemStack conversion. 2017-01-02 16:13:25 +11:00
md_5
bf8303f25d Clear effectsToProccess after applying potion effects 2017-01-02 13:51:16 +11:00
md_5
e2a288c863 SPIGOT-2969: Shulker box removal not updating comparators 2016-12-28 14:23:52 +11:00
md_5
70bc70b4ee SPIGOT-2966: Entirely remove problematic check 2016-12-28 09:50:40 +11:00
md_5
f9e044059f SPIGOT-2960: Fire HOTBAR_MOVE_AND_READD in more cases 2016-12-27 12:14:55 +11:00
md_5
056af8b9c2 SPIGOT-2964: Correct number of shelve sin PrepareEnchantEvent 2016-12-27 11:53:09 +11:00
md_5
0fb3f8b47a Correct some code. 2016-12-24 22:52:50 +11:00
md_5
96f03d9065 SPIGOT-2127: Add DamageCause.ENTITY_SWEEP_ATTACK 2016-12-23 22:40:38 +11:00
md_5
746cf0f0d7 Additional fireworks damage tracking. 2016-12-23 22:32:40 +11:00
Zach Brown
622add8458 MC-88491: Fix projectile colliding with shooter
In some situations, a projectile made collide with the entity that shot
it. This occurs because the game sets the ignored entity incorrectly.
Our fix is to ensure that the shooter is the only entity that gets
ignored by the projectile.
2016-12-23 16:41:54 +11:00
md_5
e232e1519e SPIGOT-2953: Set damager for fireworks 2016-12-22 20:26:27 +11:00
md_5
13a5b12206 SPIGOT-2944: Just apply filtering to players 2016-12-22 16:50:24 +11:00
md_5
a86731306b Update to Minecraft 1.11.2 2016-12-21 22:00:00 +11:00
md_5
fb50a80d0f SPIGOT-2948: Alter filtering logic 2016-12-21 17:12:39 +11:00
md_5
8ea0c87f51 Update to Minecraft 1.11.1 2016-12-21 07:00:00 +11:00
md_5
c8ff65136f SPIGOT-2936: Simplify WorldBorder diff 2016-12-19 23:05:39 +11:00
md_5
4602331b1d SPIGOT-2930: Shift calling of PlayerItemBreakEvent to before break. 2016-12-18 09:26:36 +11:00
md_5
7f313269d7 SPIGOT-2926: Check spawn-npcs setting for NPCs.
Probably should refactor this code to be more similar to Vanilla in future.
2016-12-17 14:26:09 +11:00
md_5
655d8407ce SPIGOT-2918: Always call EnchantItemEvent 2016-12-14 14:38:55 +11:00
md_5
c6d6844254 SPIGOT-2913: Only one enchantment applied to items 2016-12-13 08:44:50 +11:00
md_5
4f479728ee SPIGOT-2912: Fix enchanting with ID of 0 2016-12-12 09:35:31 +11:00
md_5
c4baa9cdf9 Add getLocation for InventoryEnderChest 2016-12-11 16:41:40 +11:00
md_5
0a81101bd2 Add EnchantmentOffer to PrepareItemEnchantEvent 2016-12-11 11:12:10 +11:00
md_5
7e02867f09 SPIGOT-2242: Handle changed item in PlayerPickupArrowEvent 2016-12-10 12:48:56 +11:00
md_5
aa257534dc SPIGOT-2524: Update inventory for cancelled air right click 2016-12-10 12:36:09 +11:00
md_5
7dfa530395 SPIGOT-2907: Improve EntityResurrectEvent handling 2016-12-10 12:16:14 +11:00
md_5
622630c823 Clean up BlockFlowing 2016-12-09 12:56:49 +11:00
Brokkonaut
f9eddf3f6e SPIGOT-2886: Call BlockFormEvent when Lava and Water collide 2016-12-09 12:53:15 +11:00
md_5
caf86c88a9 Use CraftEventFactory for BlockFormEvent 2016-12-09 12:45:21 +11:00
md_5
58bff62b2d SPIGOT-2891: Remove chunks if first check is false
Minecraft does double checking for synchronous generation, but since we generate chunks asynchronously we are required to check the first condition also in case the chunk was loaded between ticks. We leave the other logic to be cleaned up by the loops below.
2016-12-06 22:05:58 +11:00
Senmori
8c4397207f Implement EntityDeathEvent for ArmorStands 2016-12-06 17:10:33 +11:00
md_5
a710176e46 SPIGOT-2889: Error cancelling creative InventoryClickEvent 2016-12-05 09:07:25 +11:00
Jacob Martin
b64d852496 #326: Convert BlockMeta to handle older serialized items. 2016-12-03 10:58:18 +11:00
md_5
9beb0c9968 SPIGOT-2879: Change order of entity addition for ender pearls 2016-12-03 09:55:36 +11:00
md_5
b6ad714e85 SPIGOT-2871: Improve BlockStates + BlockStateMeta 2016-12-02 09:29:33 +11:00
Xor Boole
eb6c1bf31a Add some expansions to Anvil Inventory API 2016-11-30 16:40:40 +11:00
md_5
6d5a66f00f SPIGOT-2867: Update inventory on cancelled interacts too 2016-11-30 15:33:29 +11:00
md_5
8d7e4d17e9 Expand definition of isFrozen 2016-11-30 09:16:01 +11:00
md_5
41ade2f291 SPIGOT-2860: Don't create 0 exp orbs when breeding 2016-11-29 15:42:46 +11:00
md_5
1c07d5c78f Add hitEntity to ProjectileHitEvent 2016-11-28 12:47:01 +11:00
md_5
2ba48b4965 SPIGOT-2855: Empty ItemStacks in PlayerDeathEvent drops 2016-11-28 12:34:21 +11:00
md_5
0a1e0455e2 SPIGOT-1401: Issues placing blocks adjacent to eachother 2016-11-28 10:13:49 +11:00
md_5
d7cce99f01 Fix possible leaks in vanish API 2016-11-28 10:02:40 +11:00
LukBukkit
27d625184d SPIGOT-2695: Added BrewingStandFuelEvent and added fuel level to the BrewEvent 2016-11-27 10:37:54 +11:00
md_5
78c7614349 SPIGOT-2842: Improve item age handling 2016-11-25 10:31:53 +11:00
md_5
c3d951ddcd Farmland is a pickable block 2016-11-24 21:29:41 +11:00
md_5
281376dfb5 SPIGOT-2833: Tile entities occasionally wiped after placement 2016-11-24 09:30:01 +11:00
md_5
a0d5a841da SPIGOT-2836: ProjectileHitEvent not always firing for FishHook 2016-11-23 22:50:37 +11:00
md_5
c1462a24d8 SPIGOT-2765: Special case entity triggered explosions for HangingBreakEvent 2016-11-23 10:34:08 +11:00
md_5
7691c87df6 SPIGOT-2824: Llama Strength API 2016-11-23 10:27:49 +11:00
md_5
691628ab5c Fix setCarryingChest not resizing horse inventory 2016-11-21 21:58:29 +11:00
Lukas Hennig
0b154b1852 SPIGOT-2272: Add API for virtual Merchants 2016-11-21 15:29:36 +11:00
md_5
ac99d7d474 SPIGOT-2807: Update inventory when attack cancelled 2016-11-20 14:13:21 +11:00
md_5
95436219a5 SPIGOT-2806: Fix PlayerDropItemEvent for disconnected players 2016-11-20 10:19:22 +11:00
LukBukkit
221508dce3 Fix cancelling PlayerEditBookEvent 2016-11-20 09:33:22 +11:00
md_5
eed13ca548 SPIGOT-2800: Can only smelt 63 stack 2016-11-19 21:14:46 +11:00
momothereal
89e6712cde Add additional APIs for Evoker / EvokerFangs 2016-11-19 18:53:57 +11:00
md_5
ead445ec99 Attempt to sync damage up again - golden apples this time 2016-11-19 14:53:19 +11:00
md_5
32048c4690 SPIGOT-2795: InventoryClickEvent issues 2016-11-19 13:51:10 +11:00
Senmori
26377b763b Get Colors from ShulkerBox; Implement CustomName for Tiles. 2016-11-19 13:40:06 +11:00
md_5
f15e07b1a9 SPIGOT-2793: Revert Nameable changes 2016-11-19 03:10:04 +11:00
md_5
8095a750e7 SPIGOT-2790: Remove negative item ID filtering again 2016-11-18 15:25:43 +11:00
Senmori
5e51afde49 Get Colors from ShulkerBox; Implement CustomName for Tiles. 2016-11-18 11:28:49 +11:00
md_5
0c3bb76487 SPIGOT-2777: Mobs not being angered by snowballs 2016-11-18 10:57:53 +11:00
md_5
a0269d8e72 SPIGOT-2784: Fix Withers not being built 2016-11-18 09:20:14 +11:00
md_5
129efc132a SPIGOT-2771: Safely execute command block commands 2016-11-18 08:54:22 +11:00
md_5
2dd38f2dc4 SPIGOT-2785: Wrong effect ID for wither sounds 2016-11-18 08:41:21 +11:00
md_5
a951a88398 SPIGOT-2770: Can Place Structure Blocks Even When Not Op 2016-11-17 21:01:15 +11:00
md_5
c25ddf063a Update to Minecraft 1.11 2016-11-17 12:41:03 +11:00
md_5
2e39de698d SPIGOT-1903, MC-98153: Portal Location Sync Issues 2016-10-23 14:00:35 +11:00