Commit graph

1084 commits

Author SHA1 Message Date
CraftBukkit/Spigot
46b51ce858 Updated version to 1.4.6-R0.2-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-12-22 01:24:14 -05:00
CraftBukkit/Spigot
41a65d9a91 Updated version to 1.4.6-R0.1 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2012-12-22 01:12:16 -05:00
CraftBukkit/Spigot
d21d3199b9 Implement API to get and set FireworkMeta on Firework entities
By: feildmaster <admin@feildmaster.com>
2012-12-21 23:56:54 -06:00
CraftBukkit/Spigot
01e087c5d5 Implement Skull BlockState. Adds BUKKIT-3259
By: meiskam <meiskam@gmail.com>
2012-12-21 18:44:56 -05:00
CraftBukkit/Spigot
e8a36e2744 Zero is not less than zero. Fixes BUKKIT-3259
By: Wesley Wolfe <weswolf@aol.com>
2012-12-21 21:48:09 -06:00
CraftBukkit/Spigot
f23414917d Update enchantment handling to 1.4.6. Fixes BUKKIT-3256
By: feildmaster <admin@feildmaster.com>
2012-12-21 18:52:39 -06:00
CraftBukkit/Spigot
a04364f6a7 Use max inventory size for new stack. Fixes BUKKIT-3240
By: Wesley Wolfe <weswolf@aol.com>
2012-12-21 11:10:23 -06:00
CraftBukkit/Spigot
5d61bfd5fa Implement 1.4.6 ItemMeta. Adds BUKKIT-3236, BUKKIT-3237
Some meta functionality is refactored into common methods.

CraftItemStack uses the ItemMetaKey identifiers for enchantments.

Refactored unit test to include extra functionality; initially only
checking the presence of the DelegateDeserialization annotation.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-21 07:37:53 -06:00
CraftBukkit/Spigot
b5940b64f6 Add API to allow plugins to request players switch to a texture pack. Adds BUKKIT-2579
The setTexturePack method causes the player's client to
download and switch to a texture pack specified by a URL.

Note: Players can disable server textures on their client, in which
case this API would not affect them.

By: Wojciech Stryjewski <thvortex@gmail.com>
2012-10-09 15:57:39 -05:00
CraftBukkit/Spigot
20287b2658 Fetch correct info for skulls in block.getDrops(). Fixes BUKKIT-3205
By: Travis Watkins <amaranth@ubuntu.com>
2012-12-20 15:06:01 -06:00
CraftBukkit/Spigot
7654f3c458 [Bleeding] Fix exception in getChunkSnapshot() - sky light can be null
By: Mike Primm <mike@primmhome.com>
2012-12-20 14:05:07 -06:00
CraftBukkit/Spigot
fde7669132 Update CraftBukkit to Minecraft 1.4.6
By: feildmaster <admin@feildmaster.com>
2012-12-19 22:03:52 -06:00
CraftBukkit/Spigot
d626642cc6 Updated version to 1.4.5-R1.1-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-12-19 06:15:47 -05:00
CraftBukkit/Spigot
43f73e5e11 Updated version to 1.4.5-R1.0 in pom.xml for RB.
By: EvilSeph <evilseph@gmail.com>
2012-12-19 06:08:22 -05:00
CraftBukkit/Spigot
bae1b8659c Fix PotionMeta not applying the correct Id. Fixes BUKKIT-3193
By: feildmaster <admin@feildmaster.com>
2012-12-18 18:39:21 -06:00
CraftBukkit/Spigot
adb1c46137 Add missing name in PotionEffect for Wither
By: feildmaster <admin@feildmaster.com>
2012-12-18 18:20:11 -06:00
CraftBukkit/Spigot
0fcaa1ab6b Refactor get/setChestPlate to Chestplate. Addresses BUKKIT-3189
By: feildmaster <admin@feildmaster.com>
2012-12-18 03:40:39 -06:00
CraftBukkit/Spigot
a885a5f0ee Change enchantment comparisons to isSimilar. Fixes BUKKIT-3183
The purpose of the isSimilar method was designed to consider all NBT
data, not solely enchantments, without the need to have exact stack
size matches. The respective methods in CraftInventory were still
comparing enchantments instead of the ItemMeta.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-17 15:53:25 -06:00
CraftBukkit/Spigot
9aa9b8775a Clarify functionality in CraftInventory. Fixes BUKKIT-3097
Changes some NPEs to IllegalArgumentExceptions for exception consistency.

Contains(ItemStack, int) correctly calculates number of ItemStacks.

Adds a containsAtLeast(ItemStack, int) for finding a combined amount of a
single similar ItemStack.

Makes some utility methods private to prevent ambiguity in use.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-17 16:32:52 -06:00
CraftBukkit/Spigot
1d39ac678a Implement ItemFactory and ItemMeta values. Adds BUKKIT-15
By: Wesley Wolfe <weswolf@aol.com>
2012-12-17 01:31:41 -06:00
CraftBukkit/Spigot
9d7ccb79f2 ItemStack.asBukkitStack(null) should return Air. Fixes BUKKIT-3170
By: feildmaster <admin@feildmaster.com>
2012-12-15 01:33:14 -06:00
CraftBukkit/Spigot
30e0f5be63 Add isRecord and new material method tests.
Cleaned up all of the CraftBukkit tests, including moving some tests
from MaterialTest to PerMaterialTest.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-14 02:02:02 -06:00
CraftBukkit/Spigot
5e25b8cbe8 Fix EntityEquipment positions being reversed. Fixes BUKKIT-3157
By: deathmarine <josh@mcjoshmod.com>
2012-12-12 10:45:31 -05:00
CraftBukkit/Spigot
7f06ccfa0e Load chunks asynchronously for players.
When a player triggers a chunk load via walking around or teleporting there
is no need to stop everything and get this chunk on the main thread. The
client is used to having to wait some time for this chunk and the server
doesn't immediately do anything with it except send it to the player. At
the same time chunk loading is the last major source of file IO that still
runs on the main thread.

These two facts make it possible to offload chunks loaded for this reason
to another thread. However, not all parts of chunk loading can happen off
the main thread. For this we use the new AsynchronousExecutor system to
split chunk loading in to three pieces. The first is loading data from
disk, decompressing it, and parsing it in to an NBT structure.  The second
piece is creating entities and tile entities in the chunk and adding them
to the world, this is still done on the main thread. The third piece is
informing everyone who requested a chunk load that the load is finished.
For this we register callbacks and then run them on the main thread once
the previous two stages are finished.

There are still cases where a chunk is needed immediately and these will
still trigger chunk loading entirely on the main thread. The most obvious
case is plugins using the API to request a chunk load. We also must load
the chunk immediately when something in the world tries to access it. In
these cases we ignore any possibly pending or in progress chunk loading
that is happening asynchronously as we will have the chunk loaded by the
time they are finished.

The hope is that overall this system will result in less CPU time and
pauses due to blocking file IO on the main thread thus giving more
consistent performance. Testing so far has shown that this also speeds up
chunk loading client side although some of this is likely to be because
we are sending less chunks at once for the client to process.

Thanks for @ammaraskar for help with the implementation of this feature.

By: Travis Watkins <amaranth@ubuntu.com>
2012-11-30 02:49:19 -06:00
CraftBukkit/Spigot
c459e6fc06 Add utility class AsynchronousExecutor
This class is a general purpose task execution system, that uses stages
to separate processing blocks for asynchronous and synchronous
executions.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-12 03:54:11 -06:00
CraftBukkit/Spigot
38aca80dfa Missed a rename
By: feildmaster <admin@feildmaster.com>
2012-12-10 19:17:47 -06:00
CraftBukkit/Spigot
0ef3001c83 Add EntityEquipment API. Adds BUKKIT-3103
Adds:
- Getting/Setting equipment
- getting/setting drop rates
- getting/setting ability to pick up items
-- As an added feature, players with this flag start off with a canceled PlayerPickupItemEvent

By: feildmaster <admin@feildmaster.com>
2012-12-09 00:09:48 -06:00
CraftBukkit/Spigot
1b990d9590 [Bleeding] Correct getEyeHeight value. Fixes BUKKIT-3130
By: h31ix <low_gravity@outlook.com>
2012-12-09 21:40:10 -05:00
CraftBukkit/Spigot
f1ce3ae037 Only display help aliases when there are aliases. Fixes BUKKIT-1621
By: feildmaster <admin@feildmaster.com>
2012-12-10 01:10:39 -06:00
CraftBukkit/Spigot
3785714b45 Pass null help values values as empty strings to HelpTopics
Fixes BUKKIT-2618 and BUKKIT-2561

By: feildmaster <admin@feildmaster.com>
2012-12-10 01:03:59 -06:00
CraftBukkit/Spigot
3f11c5df16 [Bleeding] Fix NPE with a null bedSpawnLocation. Fixes BUKKIT-1500
By: EdGruberman <ed@rjump.com>
2012-12-09 17:37:37 -06:00
CraftBukkit/Spigot
7aea414399 Add isSolid() tests for each material
By: Wesley Wolfe <weswolf@aol.com>
2012-12-09 15:13:38 -06:00
CraftBukkit/Spigot
19171265b9 [Bleeding] Fix NPE in getBedSpawnLocation. Fixes BUKKIT-1949
By: EdGruberman <ed@rjump.com>
2012-07-24 21:23:33 -07:00
CraftBukkit/Spigot
7555571424 Correctly shoot arrows with the spawnArrow Method. Fixes BUKKIT-3116
By: Dark Arc <theexcel@rocketmail.com>
2012-12-06 20:38:23 -05:00
CraftBukkit/Spigot
90014b4094 Provide a faster way to get a location. Adds BUKKIT-3120
Currently when a plugin wants to get the location of something it calls
getLocation() which returns a new Location object. In some scenarios this
can cause enough object creation/destruction churn to be a significant
overhead. For this cases we add a method that updates a provided Location
object so there is no object creation done. This allows well written code
to work on several locations with only a single Location object getting
created.

Providing a more efficient way to set a location was also looked at but
the current solution is the fastest we can provide. You are not required
to create a new Location object every time you want to set something's
location so, with proper design, you can set locations with only a single
Location object being created.

By: Travis Watkins <amaranth@ubuntu.com>
2012-12-07 19:49:01 -06:00
CraftBukkit/Spigot
137f84d3b6 Use shooter constructor for Fireballs. Fixes BUKKIT-3121
Fixes fireballs exploding in the shooter's face and not having a shooter for the projectile. (Two birds with one stone!)

By: feildmaster <admin@feildmaster.com>
2012-12-06 18:36:40 -06:00
CraftBukkit/Spigot
0f71f7e6df Add the ability to launch WitherSkulls. Fixes BUKKIT-3106
By: feildmaster <admin@feildmaster.com>
2012-12-06 18:18:28 -06:00
CraftBukkit/Spigot
8497ec2d7c Implement API for wolves collar color. Adds BUKKIT-3109
By: feildmaster <admin@feildmaster.com>
2012-12-05 18:08:31 -06:00
CraftBukkit/Spigot
9be2656543 Not enough testing went into this, you can't have packages start with numbers.
By: feildmaster <admin@feildmaster.com>
2012-12-05 16:24:00 -06:00
CraftBukkit/Spigot
d73ea1b1e7 Refactor all OBC, libs, and NMS into versioned packages.
org.bukkit.craftbukkit and net.minecraft.server will now include the
minecraft version in the package name. As the internal implementations
are known to change dramatically, this refactor reduces the strain on
support requests due to version mismatching.

org.bukkit.craftbukkit.libs will also have version numbers for each
imported set of packages. These are not dictated by the minecraft
version number. This is done to prevent future incompatibilities.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-05 14:43:45 -06:00
CraftBukkit/Spigot
d54778d339 Add a custom shutdown message set in bukkit.yml. Addresses BUKKIT-3031
By: feildmaster <admin@feildmaster.com>
2012-12-03 19:32:44 -06:00
CraftBukkit/Spigot
8c0f05c6ef Allow placing blocks in spawn if ops.txt is empty. Fixes BUKKIT-3004
By: Travis Watkins <amaranth@ubuntu.com>
2012-12-05 04:59:42 -06:00
CraftBukkit/Spigot
41433805ad Fire EntityFormBlockEvent for FallingBlocks. Adds BUKKIT-3078
By: Wesley Wolfe <weswolf@aol.com>
2012-12-04 18:30:10 -06:00
CraftBukkit/Spigot
e506472f08 Implement API for mob despawn when away from players. Adds BUKKIT-2986
As of 1.4 mobs have a flag to determine if they despawn when away from a
player or not. Unfortunately animals still use their own system to prevent
despawning instead of making use of this flag. This change modifies them
to use the new system (defaults to true) and to add API for plugins to adjust
this.

By: Travis Watkins <amaranth@ubuntu.com>
2012-12-04 18:33:44 -06:00
CraftBukkit/Spigot
921c568632 [BREAKING] Update BlockFace directions. Fixes BUKKIT-1567, BUKKIT-3069
The answer is 42

By: feildmaster <admin@feildmaster.com>
2012-12-01 00:22:01 -06:00
CraftBukkit/Spigot
8b51d75b0f Add data values to EntityChangeBlockEvent. Adds BUKKIT-3077, BUKKIT-3076
This change affects Endermen and Silverfish, adding a data value for the block change event.

By: Wesley Wolfe <weswolf@aol.com>
2012-11-30 11:53:31 -06:00
CraftBukkit/Spigot
e15b0bb814 Updated version to 1.4.5-R0.3-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-11-20 20:34:41 -05:00
CraftBukkit/Spigot
2c6fe63c20 Updated version to 1.4.5-R0.2 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2012-11-20 20:06:14 -05:00
CraftBukkit/Spigot
096ca091e1 Fix teleporting entities with vehicles/passengers teleporting you illegally. Fixes BUKKIT-2821
Also some formatting...

By: feildmaster <admin@feildmaster.com>
2012-11-20 18:15:00 -06:00
CraftBukkit/Spigot
35a4233999 No teleporting people back into the server. Fixes BUKKIT-2298
Stale player references will add a player back into the world when
teleporting them, causing a cascade of issues relating to ghost entities
and servers failing to stop.

By: Wesley Wolfe <weswolf@aol.com>
2012-11-19 21:38:31 -06:00