summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
Commit message (Collapse)AuthorAgeLines
* Handle inventory max stack sizes better. Fixes BUKKIT-5564Travis Watkins2014-04-23-8/+33
| | | | | | | | Make sure we check the inventory's max stack size where appropriate and don't assume the inventory slot is able to take our entire stack just because it is empty. We also ensure the client is updated with the correct slot contents and cursor contents in cases where the max stack changes result in different behavior than the client expected.
* Faux sleepers wake up normally. Fixes BUKKIT-3667Yariv Livay2014-04-18-1/+1
|
* Allow plugins to enchant normally unenchantable items. Adds BUKKIT-1849Andre LeBlanc2014-04-18-1/+7
| | | | | | | | | | It's currently not possible for a plugin to allow enchanting of an otherwise un-enchantable item using the enchanting table. This commit causes EnchantItemEvent to be called with an empty list of enchantments, allowing a plugin to provide it's own set of enchantments when vanilla Minecraft would not allow any. It also bypasses the unsafe enchantment check since a plugin should be permitted to apply any enchantments they like, and vanilla should not generate unsafe enchantments of its own.
* Update client stack when block place is cancelled. Fixes BUKKIT-5284bloodshot2014-04-18-1/+3
| | | | | | | | | Currently, whenever a player places a block in a protected area the equipped itemstack size on client is never updated properly since the client thinks the block was placed. The reason this happens is because ItemStack.matches returns true since the server does not decrement stack size if a BlockPlaceEvent is cancelled. To correct this on cancel we set the flag to always update the client regardless of matching.
* Update chest animation after cancelling open event. Fixes BUKKIT-1440bloodshot2014-04-18-12/+44
| | | | | | | Currently if a plugin cancels an InventoryOpenEvent for vanilla chests, the chest animation for clients is stuck in the open state since IInventory's closeContainer method is never called. To fix the issue, closeContainer is called before exiting the display GUI method.
* Call event when boat is destroyed by falling. Fixes BUKKIT-5500Brokkonaut2014-04-18-7/+14
|
* Removing broken chunk caching from World. Fixes BUKKIT-5425Brokkonaut2014-04-18-16/+1
| | | | | | | | Chunk caching in the World class does not know about outdated cache values. This caused various problems when accessing previously unloaded chunks. The caching also did not improve the performance so it is removed. Synchronization is also not necessary, because all accesses to getChunkAt may only come from the main thread.
* [Bleeding] Call EntityTargetEvent in many new places.GJ2014-04-18-11/+48
| | | | | Adds BUKKIT-5388, BUKKIT-5387, BUKKIT-5386, BUKKIT-5483, BUKKIT-5484. Fixes BUKKIT-5389.
* Add files from mc-dev for diff visibility.GJ2014-04-18-0/+99
|
* [Bleeding] Call BlockRedstoneEvent for all rails. Adds BUKKIT-4080GJ2014-04-18-1/+15
| | | | | | Previously, Detector Rails were the only rails that properly called BlockRedstoneEvent when they changed from powered to unpowered. This commit adds BlockRedstoneEvent calls for both Powered Rails and Activator Rails.
* Add BlockPoweredRail.java from mc-dev for diff visibility.GJ2014-04-18-0/+132
|
* [Bleeding] Ice in the nether fades to air. Fixes BUKKIT-5373GJ2014-04-18-1/+1
| | | | | | | | Previously, whenever BlockFadeEvent was called for ice melting, it returned the new BlockState with a type of Material.STATIONARY_WATER. However, in the Nether, ice melting does not form water, but is simply replaced by air instead. This changes the event to use the proper BlockState based on whether the block is located in the Nether or not.
* [Bleeding] Fix some inventories not using maxStack. Fixes BUKKIT-2883GJ2014-04-18-3/+9
| | | | | | | CraftBukkit adds the ability to specify the maxStack size for most inventories. However, some inventories were not overriding the getMaxStack method properly, and so the functionality was unavailable. This fixes the maxStack setting for Anvils, Minecarts, PlayerInventory, and Hoppers.
* [Bleeding] Add all blocks needed to PortalCreateEvent. Fixes BUKKIT-5464GJ2014-04-18-3/+9
| | | | | | | | | | Due to changes in how portals were created in Minecraft 1.7, the code that was previously used to find the blocks involved in the PortalCreateEvent no longer detected all blocks. Additionally, in the process of updating to 1.7.2, a missed diff resulted in some blocks that were found not being properly added to the blocklist. This commit corrects that missed diff, while also adding a check to ensure that the top and bottom of the portal frame are included in the blocklist.
* [Bleeding] Add many missing SpawnReasons.GJ2014-04-18-11/+14
| | | | | | | | | | Adds BUKKIT-5370, BUKKIT-5377, BUKKIT-5378, BUKKIT-5379, BUKKIT-5380, BUKKIT-5381, BUKKIT-5382. Adds reasons for zombies infecting villagers and zombie villagers being cured. Readds reason for a skeleton being spawned as a spider jockey. Adds reason to distinguish ocelot babies from the parent they spawned with. Adds reasons for chunk generation causing the ender dragon, villagers, and witches to spawn. And finally, adds a reason for spawning a chicken mount for a baby zombie.
* Add files from mc-dev for diff visibility.GJ2014-04-18-0/+622
|
* [Bleeding] Add many missing event calls.GJ2014-04-18-40/+152
|
* Add BlockTallPlant.java from mc-dev for diff visibility.GJ2014-04-18-0/+160
|
* [Bleeding] Add missing HangingBreakEvent. Fixes BUKKIT-3943GJ2014-04-18-4/+17
| | | | | | | The old PaintingBreakByEntityEvent was deprecated and replaced by HangingBreakByEntityEvent. However, in the case of being struck by lightning, only the deprecated event was being called. This fixes that so that both the new and old events are called appropriately.
* Update CraftBukkit to Minecraft 1.7.9Nate Mortensen2014-04-17-6/+15
|
* Handle expired bans correctly. Fixes BUKKIT-5541Travis Watkins2014-04-17-3/+19
|
* Fix getting white list, ban list, and op list. Fixes BUKKIT-5538Travis Watkins2014-04-17-23/+23
| | | | | | | | The getEntries methods on these return player names instead of UUIDs. As we need the UUIDs for our API we add a getValues method to get at the data we need. To further ensure we get the most data possible we also add a way to get at the stored GameProfile to ensure we always have both the UUID and the name from the list.
* Import files from mc-dev for diff visibilityTravis Watkins2014-04-17-0/+235
|
* [Bleeding] Re-add missed diff in 1.7.5 update. Fixes BUKKIT-5536t00thpick12014-04-17-1/+1
| | | | | | In the 1.7.5 update the diff that called book edit events when editing books was accidentally dropped because of nms changes within the file. This commit re-adds the craftbukkit call to restore event behavior.
* Fix missed diff and other small thingsTravis Watkins2014-04-13-12/+16
|
* Use world-container when finding players to convert. Fixes BUKKIT-5530Travis Watkins2014-04-13-1/+1
|
* Update CraftBukkit to Minecraft 1.7.8Travis Watkins2014-04-11-525/+1453
|
* Add method to send fake sign updates to players. Adds BUKKIT-2300Patrick Seidel2014-04-02-17/+16
|
* Add player unique ID to (Async)PlayerPreLoginEvent. Adds BUKKIT-5108BlackHole2014-04-02-2/+3
|
* Fix issues with leashes and weather due to missed diffTravis Watkins2014-03-26-2/+2
|
* Correct missed diffTravis Watkins2014-03-24-3/+3
|
* Fix missed diff making horses lose their saddleTravis Watkins2014-03-22-1/+1
|
* Fix teleport failing right after join. Fixes BUKKIT-5479Travis Watkins2014-03-22-3/+14
| | | | | | | | | | Teleporting a player checks to see if the player is disconnected to try to avoid creating ghost players. The check it uses, however, randomly fails when the player is in the middle of joining the server. The check that would work correctly here does not work correctly when the player actually disconnects. To work around this we add a new flag which is cleared on the first tick of the new player and assume they are connected if the flag is set.
* Update CraftBukkit to Minecraft 1.7.5Nate Mortensen2014-03-21-2589/+2578
|
* Remove chunks from queue if we don't need them anymore.Travis Watkins2014-02-12-10/+40
|
* Check if entity is in list before decrementing. Fixes BUKKIT-5404EvilSeph2014-02-11-3/+5
|
* Ignore player selectors if not a Command Block.EvilSeph2014-02-11-0/+6
|
* Add PlayerSelector.java for diff visibility.EvilSeph2014-02-11-0/+241
|
* Hide message from connection throttle on startup. Fixes BUKKIT-5403Travis Watkins2014-02-10-1/+1
|
* Readd diff missed in the 1.7 update.Travis Watkins2014-02-10-6/+26
|
* Handle removing entity while ticking. Fixes BUKKIT-1331Travis Watkins2014-02-10-6/+14
| | | | | | | | | If a plugin causes an entity to be removed from the world while the world is ticking entities the ticking loop gets out of sync and fails due to trying to go beyond the end of the entity array. To ensure this doesn't happen we store the loop position as a field so we can fix it up in the entity remove method just like the tick method does when it removes an entity.
* Readd BlockPlaceEvent for half slab to full block. Fixes BUKKIT-5390Aikar2014-02-09-2/+6
|
* [Bleeding] Implement Mojang command fallback system. Adds BUKKIT-5385t00thpick12014-02-08-4/+14
|
* [Bleeding] Correctly enchant books. Fixes BUKKIT-5302t00thpick12014-02-06-9/+6
| | | | | | | | | | | | | | Books can now recieve more than one enchantment. As such, breaking out of the loop after only 1 enchantment is applied is not the correct behavior. This commit also reworks some of the logic surrounding the application of enchantments to the item. By checking if the event doesn't add any enchantments rather than if the original enchantments list is empty, the application code is only reached if enchantments are applied, rendering the "applied" boolean no longer necessary. The ItemStack's Item should only be set once, so it is now set outside of the loop based upon whether or not "flag" is true (with "flag" being whether or not the ItemStack's Item is a book).
* Implement SpawnReason.NETHER_PORTAL and DISPENSE_EGG. Fixes BUKKIT-3148Kodekpl2014-02-01-3/+10
| | | | | | | | | | | | | | | | Previously any entities spawned through dispensers (monster eggs) or by nether portals were given the incorrect SpawnReason of SPAWNER_EGG. This made it impossible to distinguish what exactly happened in regards to the creature being spawned. A method in ItemMonsterEgg has been added to further fine tune reasons for spawning creatures. This permits the DISPENSE_EGG reason to be used correctly and accuratly as well as the NETHER_PORTAL reason due to how BlockPortal spawns the mobs. The redirected method, a(World, int, double, double, double), is still called by the ItemMonsterEgg itself and therefore uses the default reason of SPAWNER_EGG. This does not change previous behaviour.
* [Bleeding] Handle players disconnecting during respawn. Fixes BUKKIT-4327turt2live2014-02-01-5/+15
| | | | | | | | | | | | | | | | Prior to this commit, a player disconnected during a respawn event would remain in memory. This causes a ghosting issue of players in the slot count and player list, as well as a reference leak. This commit avoids re-adding the player to the player list (and world) if they are disconnected. This ensures that the remainder of the respawn logic is completed as well as ensuring a duplicate player is not left on the server. This commit also saves the player's file at the end of the method if they have been disconnected to ensure that their next login is accurate to the respawn event's actions. A player that was revived and disconnected will reconnect as revived.
* Load all already generated chunks via async chunk systemTravis Watkins2014-02-01-13/+25
| | | | | | | | | | | | | Currently we use the async chunk loading system only when players trigger chunk loading. If a chunk is loaded for any other reason it goes through a separate codepath. This means if a player has trigged a chunk load and before the chunk loads something else wants the same chunk we will load it twice and throw away the second result. With this change we instead use the sync processing feature of the AsynchronousExecutor to load the chunk which will pull it out of the queue if it was already queued to load. This means we only ever load a chunk once. Because chunk generation is not thread safe we still fallback to the vanilla chunk loading system if the chunk does not currently exist.
* Don't call duplicate interact air events. Fixes BUKKIT-5359Travis Watkins2014-01-31-11/+1
| | | | | | | | | | | | Previously we attempted to call interact events in cases that were missing by modifying the arm swing logic. This, however, was too broad and started triggering events in cases we already covered leading to duplicates. Since the only case we can handle cleanly and the primary point of the previous fix was fluids we now instead simply treat fluids as air for this check. This also ensures we do not get duplicate events when the player is in a fluid and hits a normal block, unlike the previous change. This reverts commit 68b702f7 and replaces it with a better fix.
* [Bleeding] Store correct block type when hitting blocks. Fixes BUKKIT-5209t00thpick12014-01-30-1/+1
| | | | | | | The block obtained and stored within the block object higher up does not reflect the block at the location being hit, rather it is the air block the arrow was previously in. Thusly when the variable is used to check if the arrow is still in the block, it fails.
* [Bleeding] Implement ProjectileSource API. Addresses BUKKIT-1038, BUKKIT-1156t00thpick12014-01-30-1/+11
|