summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeLines
...
* Add raw sound string playSound method. Adds BUKKIT-2443h31ix2013-08-02-1/+5
| | | | A method has been added to Player which allows the server to send a sound string to the client. Assuming the client has the specified sound, it will be played. This is needed by the implementation of the /playsound command.
* Restore diff missed in 4176258a836062b22ac46919aefa5cc36fae78f2Wesley Wolfe2013-08-01-0/+4
|
* Revert "Correct vehicle movement issues." Fixes BUKKIT-4565Wesley Wolfe2013-07-29-11/+3
| | | | | | | This reverts commit 3d906d134417cfeefe7f71b916fee4d105e7650f. Conflicts: src/main/java/net/minecraft/server/EntityTrackerEntry.java
* Fix NBT token for attribute names. Addresses BUKKIT-4483Wesley Wolfe2013-07-28-1/+7
|
* Store item attributes. Addresses BUKKIT-4523Wesley Wolfe2013-07-27-1/+134
|
* Restore CraftBukkit diff in ItemDye. Fixes BUKKIT-4493T00thpick12013-07-25-1/+1
| | | | Change ItemDye to pass the EntityHuman for StructureGrowEvent again.
* Store owning Horse in horse inventory. Fixes BUKKIT-4586Wesley Wolfe2013-07-25-3/+8
|
* Fix CraftBukkit diffsWesley Wolfe2013-07-23-3/+3
|
* Check interactable items before event. Fixes BUKKIT-4576Wesley Wolfe2013-07-23-10/+16
| | | | | | | Items that cause entities to change state, including tags, chest, and leashes, do not update the client properly following the firing of PlayerInteractEntityEvent. This change makes the item checks occur before the event fires, to concur with the client's assumptions.
* Add API to control scaled health. Adds BUKKIT-4590T00thpick12013-07-23-11/+106
| | | | | | | | | | | | | | | | | | | | | | | This commit implements the ability to set the scale of hearts that the client renders. When the Packet44UpdateAttributes packet is sent, the max health attribute is replaced with a scaled version, to preserve the scaled health illusion clientside. In order to accurately display the scaled health for players, a true health is stored within CraftPlayer, and the datawatcher now stores the scaled health. The getHealth() method for players still returns their true health. Changed setHealth() within EntityLiving to appropriately handle health for instances of EntityPlayer. Inlined a call to setHealth(getMaxHealth()) within the EntityLiving constructor to work around CraftEntity instantiation. Additionally fixes the health values sent when eating food within FoodMetaData and ItemFood, which previously sent the unscaled health; this commit alters them to send the properly scaled health. Additionally fixes BUKKIT-4535, BUKKIT-4536, and BUKKIT-4127
* Use ambient setting of potion effects. Fixes BUKKIT-4357 and BUKKIT-3653Jim Bilbrey2013-07-13-2/+2
| | | | | | | | | This changes livingEntity.addPotionEffect(PotionEffect, boolean) to construct the MobEffect using the constructor that includes the ambient setting as supplied by the PotionEffect This also changes livingEntity.getActivePotionEffects() to construct the PotionEffects using the ambient setting supplied by the MobEffects.
* Correctly fire VehicleExitEvent. Fixes BUKKIT-3761Nate Mortensen2013-07-13-6/+52
| | | | | | | | | | | | This change makes it so that EntityHuman#setPassengerOf(Entity) invokes its parent method when leaving vehicles so that VehicleExitEvent is fired for players leaving vehicles. This change also fixes BUKKIT-2110, making it so VehicleExitEvent correctly handles cancellation. The implementation of VehicleExitEvent completely ignored the cancellation state of the event, making it so that cancelling the event had no effect. Cancelling a VehicleExitEvent now causes the entity to remain inside of the vehicle, with no visual stutter.
* Return inGround when checking Arrow's OnGround state. Fixes BUKKIT-4439EvilSeph2013-07-10-0/+9
|
* Clear attributes on death; mistranslation issue.EvilSeph2013-07-10-1/+1
|
* Implement Horse API. Adds BUKKIT-4424h31ix2013-07-10-48/+210
| | | | | | | | API has been added to interface with Horses and to modify their inventories. Horse entities will now be recognized with the type EntityType.HORSE, and will no longer be UNKNOWN. HorseJumpEvent, EntityDamageEvent, and EntityTameEvent are all correctly fired for horses. This commit fixes BUKKIT-4393.
* Add PathfinderGoalTame for diff visibility.h31ix2013-07-10-0/+63
|
* Correctly set level name for 'world' option. Fixes BUKKIT-4474EvilSeph2013-07-09-1/+1
|
* Ocelots -> Ocelittle. Addresses BUKKIT-4449EvilSeph2013-07-09-3/+6
|
* Update CraftBukkit to 1.6.2mbax2013-07-08-1102/+1152
|
* Removed extra eat call. Fixes BUKKIT-4462EvilSeph2013-07-04-1/+0
|
* Properly clear attributes on remove and death. Fixes BUKKIT-4416EvilSeph2013-07-03-7/+2
|
* Fix scaling for player health. Fixes BUKKIT-4431Wesley Wolfe2013-07-02-2/+15
|
* Fix donkey/mule dupe exploit.EvilSeph2013-07-02-1/+3
|
* Added EntityHorse for diff visibility.EvilSeph2013-07-02-0/+1186
|
* Update client on cancelled entity naming. Fixes BUKKIT-4396mbax2013-07-02-0/+4
|
* Update client on cancelled leash. Fixes BUKKIT-4395mbax2013-07-02-0/+4
|
* Send event-defined MOTD/maxplayers. Fixes BUKKIT-4409mbax2013-07-02-8/+11
| | | | Also, revert to previous CraftBukkit functionality
* Fix world preparation status output. Fixes BUKKIT-4407mbax2013-07-02-3/+2
|
* Regrow sheep wool on grass consumption. Resolves BUKKIT-4405mbax2013-07-02-2/+2
|
* Fix Entity persistence. Fixes BUKKIT-4397Nate Mortensen2013-07-02-1/+1
| | | | Missed diff.
* Rework max health values. Fixes BUKKIT-4398Wesley Wolfe2013-07-02-60/+21
|
* Fixed NPE in BrewingStandWesley Wolfe2013-07-01-2/+1
|
* Update CraftBukkit to 1.6.1Nate Mortensen2013-07-01-5153/+6104
|
* Fix cancellation for InventoryDragEvent. Fixes BUKKIT-4332Nate Mortensen2013-06-13-0/+2
| | | | | | | | | | | Cancelling InventoryDragEvent causes the placed items to be lost. This is because the cursor is set to the result prior to the event taking place, so the items are removed from the cursor. When the event is cancelled, the items removed from the cursor aren't placed in the inventory, and are just lost. This change sets the cursor back to the original cursor when the event is cancelled.
* Correct cancellation of InventoryClickEvent. Fixes BUKKIT-4331Nate Mortensen2013-06-13-2/+2
| | | | | | | | | | | | | Cancelling an InventoryClickEvent for a single click causes the click not to be processed by the clicked inventory. The server then doesn't correctly identify their second click as being a double click, causing an inconsistency between what the Player believes the inventory to be and what the server believes the inventory to be. This change forces an updateInventory call whenever an InventoryClickEvent whose action is NOTHING is cancelled. Both clicks are considered PICKUP_ALL, so updating the inventory after the second click fixes any inconsistencies that could arise between the client and the server.
* Fix negative damage from Zombies. Fixes BUKKIT-4193ST-DDT2013-06-13-1/+3
| | | | | | | | | | | | | | | Currently, the method used for calculating the damage of zombies is scaled to their health, but it uses the default max health rather than the real max health value. If zombies have more health than the default max health value, the amount of damage they deal becomes negative. This is caused by EntityZombie.getMaxHealth() returning a hardcoded value of 20, which is the vanilla max health for zombies. Rather than using this value when calculating zombie damage, the call is changed to instead use ((CraftLivingEntity) this.bukkitEntity).getMaxHealth(). This uses the true maximum health of the Entity. "this.maxHealth" could be used instead of the aforementioned method, however that creates a very unclear diff, and a confusing change.
* Implement PlayerBookEditEvent. Adds BUKKIT-1995Des Herriott2013-06-10-9/+32
|
* Update blaze breathe sound. Fixes BUKKIT-4286mbax2013-06-05-1/+1
|
* Fix creative ArrayIndexOutOfBoundsException. Fixes BUKKIT-4305Nate Mortensen2013-06-04-35/+31
| | | | | | | | | | | | | When a Player drops an ItemStack while in creative mode by placing it outside of their inventory window, the slot number in the packet is -1. The check that was added to avoid throwing InventoryCreativeEvent excessively didn't take this into account, and would cause an ArrayIndexOutOfBoundsException to be thrown when attempting to get the slot specified by the packet. This change shorts the invocation of player.defaultContainer.getSlot( packet107setcreativeslot.b) to only occur if the slot id is within the range of the Inventory. This prevents attempting to get the slot from a location that is actually outside of the Inventory.
* Improve events for new inventory features. Adds BUKKIT-3859riking2013-06-03-72/+326
| | | | | | | | | | | | | | | | | | | | | | | | | This commit brings the InventoryClickEvent up to date with the new Minecraft changes in 1.5. InventoryDragEvent (thanks to @YLivay for his PR) is added to represent the new "dragging" or "painting" functionality, where if you hold an itemstack and click-drag over several slots, the items will be split evenly (left click) or 1 each (right click). The ClickType enum is used to represent what the client did to trigger the event. The InventoryAction enum is reserved for future expansion, but will be used to indicate the approximate result of the action. Additionally, handling of creative inventory editing is improved with the new InventoryCreativeEvent, and handling of numberkey presses is also improved within InventoryClickEvent and CraftItemEvent. Also, cancelling a creative click now displays properly on the client. Adresses BUKKIT-3692, BUKKIT-4035, BUKKIT-3859 (new 1.5 events), BUKKIT-2659, BUKKIT-3043, BUKKIT-2659, and BUKKIT-2897 (creative click events).
* Pass correct block when dispensing empty buckets. Fixes BUKKIT-3668Travis Watkins2013-05-03-2/+2
|
* Correct event handling for dispensing filled buckets. Fixes BUKKIT-4046Travis Watkins2013-05-03-1/+1
| | | | | | | | We only go through event creation and calling when dispensing filled buckets if the bucket is able to place its liquid. However, the check for this is incorrect so the event is not called when a block liquids can destroy is in front of the dispenser. This commit fixes the check to match the checks vanilla does when actually using the bucket.
* Send block updates even when applyPhysics is false. Fixes BUKKIT-3971Des Herriott2013-05-02-3/+3
| | | | | | The CraftBlock class is setting bit 0x4 of the update flag when bit 0x2 should in fact be set here. Bit 0x2 means "do updates"; bit 0x4 means "don't do updates if the world is static, even when bit 0x2 is set".
* Fix typo/logic error in previous commitTravis Watkins2013-05-02-1/+1
|
* Fix animal spawning ignoring limits. Fixes BUKKIT-4180Travis Watkins2013-05-02-1/+10
| | | | | | | | | Minecraft 1.5.2 changed mob spawning by ignoring persistent mobs from the mob count. In CraftBukkit all mobs that previously used a separate hard coded persistence system were ported to instead use this one. This causes all animals to be persistent by default and thus never be counted. To correct this issue we consider if the mob would be considered persistent in the hard coded system as well when deciding if a mob should count.
* Improve InventoryCloseEvent handling. Fixes BUKKIT-3286Travis Watkins2013-05-02-12/+18
| | | | | | | | | | Currently there are several cases where a player will have their inventory screen closed client side but we will not call an event. To correct this we call the event when the server is the cause of the inventory closing instead of just when the client is the cause. We also ensure the server is closing the inventory reliably so we get the events. Additionally this commit also calls the event when a player disconnects which will handle kicks, quits, and server shutdown.
* Move world generator warning to CraftBukkit. Fixes BUKKIT-2565Score_Under2013-04-30-1/+4
|
* Always process movement for vehicles and passengers. Fixes BUKKIT-4142Travis Watkins2013-04-30-1/+1
| | | | | | | | | As an optimization we don't do any movement processing on entities that have not moved. However, players in minecarts trigger this condition when the minecart is moving on its own. This causes issues with things that rely on player collision like tripwires. To correct this and any future related issues we always handle movement for passengers and their vehicles even if one of the two hasn't moved since they are linked.
* Revert "Add delay to hopper even if it doesn't do anything."Travis Watkins2013-04-27-4/+1
| | | | This reverts commit f5388e8f94e2cbab76c2255fd872c289e83100a0.
* Fix things using wall time running too fast. Fixes BUKKIT-4155Travis Watkins2013-04-27-154/+4
| | | | | | | | | | | | | | When converting things in Minecraft to use wall time instead of ticks I realized we'd run into integer division rounding issues and could have updates that end up counting as zero ticks. To compensate for this the code ensures we always process at least one tick. However, every time we end up with zero ticks the next time we have an extra tick due to rounding the other way with the leftovers. This means we are going far too fast and should not have this at least one tick logic at all. On top of this some potions rely on the number of ticks they run and not just the amount of time they last and so potions were put back to running with ticks entirely.