summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
Commit message (Collapse)AuthorAgeLines
* 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
|
* Add methods to get and set arrow knockback. Adds BUKKIT-5103Likaos2014-01-30-1/+1
|
* [Bleeding] Re-add EntityShootBowEvent lost in ↵GJ2014-01-30-1/+13
| | | | | | e93a3eb3b4c5234e3e3936bc697d566a42d3b30e. Fixes BUKKIT-4214 In the 1.2 update for CraftBukkit, a missed diff resulted in Skeletons no longer firing an EntityShootBowEvent when they shoot an arrow.
* [Bleeding] Fire interact events for Weighted Pressure Plates. Fixes BUKKIT-5053GJ2014-01-30-1/+26
| | | | | | | | In 1.7, Minecraft changed Weighted Pressure Plates to allow players and entities to interact with them, rather than simply changing redstone signal based on the number of items on the pressure plate. This commit adds calls to PlayerInteractEvent or EntityInteractEvent for every entity that steps on the plate.
* Add BlockPressurePlateWeighted.java for diff visibilityGJ2014-01-30-0/+35
|
* Relocate NaN check on PacketPlayInFlying.Nate Mortensen2014-01-29-7/+7
|
* Readd connection throttleTravis Watkins2014-01-28-0/+45
|
* Implement API for ServerListPingEvent. Adds BUKKIT-5121, BUKKIT-2465Wesley Wolfe2014-01-19-3/+69
|
* [Bleeding] Properly handle EntityBreakDoor event canceling. Fixes BUKKIT-5318t00thpick12014-01-18-1/+1
| | | | | | The method being called was renamed during the 1.4.2 update process but the function call was not replaced accordingly, leading to a missed diff from 314051580a0a8e4745d3a539f232b552916eb302.
* [Bleeding] Check that vanilla recipes actually exist. Fixes BUKKIT-5277t00thpick12014-01-18-1/+1
| | | | | | When falling back to vanilla recipes in the iteration of recipes, a check is necessary to ensure that vanilla recipes are present. RecipeIterator has been modified to account for the multi-map setup.
* [Bleeding] Fix Achievements and Statistics API. Fixes BUKKIT-5305t00thpick12014-01-16-0/+6
|
* Add StatisticManager.java for diff visibility.t00thpick12014-01-16-0/+61
|
* Only delay removing containers. Fixes BUKKIT-5238Travis Watkins2013-12-24-2/+12
| | | | | | | | In commit f94b7af8 I delay removing the block until after running the block's cleanup code to avoid errors. However, this causes problems of its own due to blocks not being written with this in mind. To avoid blocks getting recursively removed we now only delay removing containers since they are the only ones we had problems with to begin with.
* Process block cleanup first. Fixes BUKKIT-4103Travis Watkins2013-12-24-1/+2
| | | | | | | | | | When setting a block the server sets the new block ID, calls the cleanup on the old block, then calls the placement logic for the new block. This would normally work correctly but we have logic to prevent errors that is causing one here. When trying to clean up the old block we notice the block ID has changed and try to fix things, this causes the cleanup logic to fail. To ensure cleanup happens correctly we now do all the cleanup before changing the block which avoids triggering the fixup code.
* [Bleeding] Handle custom furnace recipes separately. Fixes BUKKIT-1657, ↵t00thpick12013-12-20-2/+19
| | | | | | | | | | BUKKIT-3846 Due to vanilla blanket comparing data values, and the unspecified order of hashmap iterators, we need to run through custom recipes first, and therefore separately, to ensure that they are actually used. By not adding the custom results to the experience table, we do not override the experience gains from vanilla smelting recipes.
* [Bleeding] Fix crash involving horse passengers. Fixes BUKKIT-5212t00thpick12013-12-20-1/+1
| | | | | | Setting a horse's passenger to a non-living entity will cause a server crash when the horse ticks, we need to check that it is a living entity before casting, and skip otherwise.
* [Bleeding] Call event when reflecting fireballs. Adds BUKKIT-5214t00thpick12013-12-20-0/+12
|
* [Bleeding] Send short version string on ping. Addresses BUKKIT-5206t00thpick12013-12-20-2/+2
| | | | | | | With the update in 1.7 that improved the server ping, it was made to include a long version string for CraftBukkit. This value is too long for proper display so we now send a shortened string consisting of the server implementation and the minecraft version.
* Account for different reach limit in Survival/Creative. Fixes BUKKIT-4257EvilSeph2013-12-20-4/+6
| | | | | | | | | When we first added the reach limiter in CraftBukkit there was no difference between how far the client could reach in vanilla while in Survival or Creative. At some point in Minecraft's cycle Creative was given a block extra to work with and our protection was not updated to account for this. We need to respect the possibility of different game modes in Minecraft providing the client with varying reach distances.
* Fix attributes not clearing on death. Fixes BUKKIT-5213EvilSeph2013-12-20-1/+1
| | | | | | | | Due to an incorrect mapping of this method to a friendly name, we're unfortunately calling the wrong method within EntityPlayer.reset() to reset attributes. Instead of what we've mapped as "removeAllEffects", we should be calling EntityLiving.aP(). This mapping should be corrected in the next naming version.
* [Bleeding] Correctly generate torches on portal. Fixes BUKKIT-746t00thpick12013-12-17-4/+4
| | | | | | | In the CraftBlockState implementation, updating the blockstate onto a block will force the block state data value onto the block. Unlike vanilla which relied on block data being set when the type changed, we must instead explicitely set the data in the blockstate.
* Fix mistranslation issue for PlayerToggleFlightEvent. Fixes BUKKIT-5172EvilSeph2013-12-17-1/+1
| | | | Thanks for pointing it out RingOfStorms!
* Remove references to chunklist. Fixes BUKKIT-5190frymaster2013-12-17-3/+0
| | | | | | | | | | Commit c576054539790bdeb35285f62863d74b48c0782d removed the chunklist collection stored in ChunkProviderServer, however it has been partially restored in some places by 7e1ac0a77129b169704c1e222ff2deb3ab6cd2d2. As not all references to this were restored, this has caused the chunklist and chunks collections to become out of sync, resulting in a memory leak. This commit removes chunklist from ChunkProviderServer again.
* [Bleeding] Fix incorrect Cocoa Bean orientation. Addresses BUKKIT-5182t00thpick12013-12-17-1/+6
| | | | | | | When ItemDye is used to place a Cocoa Block, the postPlace() method should not be called, as data is handled within the ItemDye class. However, if Cocoa is placed via its block item, postPlace() should still be called to mirror vanilla behavior.
* Don't try to teleport to a null world. Fixes BUKKIT-5145Travis Watkins2013-12-14-1/+1
|
* [Bleeding] Fix witches dropping empty ItemStacks on death. Fixes BUKKIT-3554GJ2013-12-13-1/+3
|
* [Bleeding] Fix Blazes not firing death events. Fixes BUKKIT-4898GJ2013-12-13-5/+6
| | | | | | | Previously, due to the way that death events were called, Blazes only fired death events when they dropped loot. This change fixes that, enabling death events for Blazes whenever they die, regardless of loot drops.
* [Bleeding] Call EntityTargetEvent for EnderDragons. Fixes BUKKIT-5160t00thpick12013-12-13-1/+14
| | | | | | EnderDragons did not call an EntityTargetEvent when they were targeting random players in the End. This commit adds that event call into the targeting code.
* Throw event when EnderCrystals harm EnderDragon. Fixes BUKKIT-4052t00thpick12013-12-13-1/+10
| | | | | | | The EntityLiving dealDamage method will not call an event for the entity damage caused by an explosion without an associated entity cause, therefore, the explosion caused by EnderCrystals needs to be explicitely handled within the EnderDragon class.
* Re-add WorldLoadEvent lost in 314051580a0a8e4745d3a539f232b552916eb302 ↵t00thpick12013-12-13-0/+4
| | | | | | | | Fixes BUKKIT-5125 In the 1.4.2 update for CraftBukkit, a missed diff resulted in the WorldLoadEvent no longer being fired for the worlds loaded on startup.
* Alter fall particles to respect visibility API. Fixes BUKKIT-5158t00thpick12013-12-13-1/+8
| | | | | | | Bukkits Visibility API should prevent players from seeing fall particles of players that they cannot see. This commit alters the handling to provide an EntityPlayer argument that is later used to determine if they are visible.
* Show fall particles while in creative mode. Fixes BUKKIT-5009t00thpick12013-12-13-1/+0
| | | | | Relocate CraftBukkit patch to fall damage when changing gamemode from creative mode.
* Only filter data from block items, not all of them. Fixes BUKKIT-5047Travis Watkins2013-12-13-7/+8
|
* Call interact event if block cannot be punched. Fixes BUKKIT-5126Travis Watkins2013-12-12-0/+10
| | | | | | | | We do ray tracing on arm swings to filter out swings that hit blocks since punching blocks has its own event handling. However, some blocks cannot be punched so the air interact type is still valid for them. Luckily these blocks all have a means to query them so add an additional check for this and don't fail the check for them.