Commit Graph

2150 Commits

Author SHA1 Message Date
Wesley Wolfe
6dc13b688a One record per JukeBox. 2012-12-22 05:48:11 -06:00
Wesley Wolfe
2fd78a6549 Add BlockJukeBox for diff visibility 2012-12-22 05:45:52 -06:00
EvilSeph
adc1c2f982 Updated version to 1.4.6-R0.2-SNAPSHOT for development towards next release. 2012-12-22 01:24:14 -05:00
EvilSeph
e6f14b4be5 Updated version to 1.4.6-R0.1 in pom.xml for Beta. 2012-12-22 01:12:16 -05:00
feildmaster
2ee62eb580 Implement API to get and set FireworkMeta on Firework entities 2012-12-21 23:56:54 -06:00
meiskam
fdb4b2d911 Implement Skull BlockState. Adds BUKKIT-3259 2012-12-21 22:47:11 -06:00
meiskam
39e2af7bd1 Added TileEntitySkull for diff visibility 2012-12-21 21:56:47 -06:00
Wesley Wolfe
78d384de93 Zero is not less than zero. Fixes BUKKIT-3259 2012-12-21 21:48:09 -06:00
feildmaster
a0cf0d03f4 Check file existence before determining readOnly. Fixes BUKKIT-3255 2012-12-21 19:31:39 -06:00
feildmaster
ec211ed952 Update enchantment handling to 1.4.6. Fixes BUKKIT-3256 2012-12-21 19:31:28 -06:00
feildmaster
f71be2506d Fix loading Items entities with an invalid item. Addresses BUKKIT-3249 2012-12-21 16:07:59 -06:00
feildmaster
118682ce5c Don't save server properties when it's read only. Fixes BUKKIT-3250 2012-12-21 15:40:39 -06:00
feildmaster
0216d09033 Fix command line arguments being ignored. Fixes BUKKIT-3247 2012-12-21 15:40:39 -06:00
feildmaster
e937307596 Add a null check for Item Entities. Fixes BUKKIT-3249 2012-12-21 15:40:27 -06:00
Wesley Wolfe
b870755edb Use max inventory size for new stack. Fixes BUKKIT-3240 2012-12-21 11:10:23 -06:00
Wesley Wolfe
708252c020 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.
2012-12-21 10:36:34 -06:00
Wojciech Stryjewski
f377a7680f 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.
2012-12-20 22:09:38 -05:00
feildmaster
f4836fb428 Add the ability to make Enchanted Books. Fixes BUKKIT-3220 2012-12-20 20:51:51 -06:00
feildmaster
bd0daa6d54 Remove obsolete fix for the end
The end was getting block offsets, causing client side issues.
2012-12-20 19:15:37 -06:00
Travis Watkins
ca7f67da9d Fetch correct info for skulls in block.getDrops(). Fixes BUKKIT-3205 2012-12-20 15:06:01 -06:00
Mike Primm
ed2dd31a80 [Bleeding] Fix exception in getChunkSnapshot() - sky light can be null 2012-12-20 14:22:25 -06:00
feildmaster
686807e387 Filter invalid ItemStacks from Packets.
Invalid ItemStacks are causing Fireworks to disconnect players and
prevent them from reconnecting
2012-12-20 10:52:44 -06:00
feildmaster
23b6764374 Update CraftBukkit to Minecraft 1.4.6 2012-12-20 10:43:00 -06:00
EvilSeph
9f1bf124ee Updated version to 1.4.5-R1.1-SNAPSHOT for development towards next release. 2012-12-19 06:15:47 -05:00
EvilSeph
06ae8e4826 Updated version to 1.4.5-R1.0 in pom.xml for RB. 2012-12-19 06:08:22 -05:00
mbax
924a46469d [Bleeding] Check visibility API for sounds. Fixes BUKKIT-3114
With 1.4, entity sound tracking changed for the better.
Our previous method additions can now be removed.
All that's left is checking if the source can be seen
by the recipient of the sound packet. Thanks, Mojang!
2012-12-18 19:02:20 -06:00
feildmaster
d9708d032e Fix PotionMeta not applying the correct Id. Fixes BUKKIT-3193 2012-12-18 18:43:53 -06:00
feildmaster
d73e5ab469 Add missing name in PotionEffect for Wither 2012-12-18 18:20:11 -06:00
feildmaster
a2d551fafa Refactor get/setChestPlate to Chestplate. Addresses BUKKIT-3189 2012-12-18 03:46:58 -06:00
Wesley Wolfe
6cec8ba5cb 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.
2012-12-17 16:43:16 -06:00
Wesley Wolfe
d66d3674ea 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.
2012-12-17 16:39:25 -06:00
Wesley Wolfe
78f48258d8 Implement ItemFactory and ItemMeta values. Adds BUKKIT-15 2012-12-17 01:31:41 -06:00
feildmaster
d20d4dc43a ItemStack.asBukkitStack(null) should return Air. Fixes BUKKIT-3170 2012-12-15 01:52:42 -06:00
Wesley Wolfe
0f4c206f9b Add isRecord and new material method tests.
Cleaned up all of the CraftBukkit tests, including moving some tests
from MaterialTest to PerMaterialTest.
2012-12-14 02:02:02 -06:00
deathmarine
53b064ec79 Fix EntityEquipment positions being reversed. Fixes BUKKIT-3157 2012-12-12 22:20:44 -06:00
Travis Watkins
24143ef6a1 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.
2012-12-12 19:35:53 -06:00
Travis Watkins
11593b4592 Add RegionFile from mc-dev for diff visibility 2012-12-12 04:05:47 -06:00
Wesley Wolfe
29d7cc711b 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.
2012-12-12 04:05:47 -06:00
Travis Watkins
24c04dc784 Don't run mob pickup code on players. Fixes BUKKIT-3150
When a player has canPickUpLoot set to true the code for mob pickup is
triggerd which does not know how to deal with player inventory. Since
players have their own logic for picking up items we simply disable this
code for them.
2012-12-12 03:08:14 -06:00
feildmaster
4e91fbd0db Fix players not being able to pickup items due to default values.
The old flag for picking up loot was default to false, making existing players not able to pickup items. We now use this flag for Players, which gives us the problem we had in 48b46f83.

To fix this, we add an incremental flag that will be cross-examined to check if the data was saved before or after the flag level was introduced.

Addresses BUKKIT-3143
2012-12-11 06:05:54 -06:00
feildmaster
39fdb56200 Players should be able to pick up items by default. Fixes BUKKIT-3143
As an added feature, players defaulted to being able to not pick up items if the flag was false. However, since minecraft doesn't normally use the flag on players, the flag was always false.
2012-12-10 20:27:40 -06:00
feildmaster
3692209fe6 Missed a rename 2012-12-10 19:17:47 -06:00
feildmaster
430d352a5a 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
2012-12-10 19:01:50 -06:00
h31ix
684ba31c39 [Bleeding] Correct getEyeHeight value. Fixes BUKKIT-3130 2012-12-10 01:41:00 -06:00
feildmaster
22b1100001 Only display help aliases when there are aliases. Fixes BUKKIT-1621 2012-12-10 01:40:22 -06:00
feildmaster
dc93da8e34 Pass null help values values as empty strings to HelpTopics
Fixes BUKKIT-2618 and BUKKIT-2561
2012-12-10 01:40:21 -06:00
EdGruberman
f18b3cdc76 [Bleeding] Fix NPE with a null bedSpawnLocation. Fixes BUKKIT-1500 2012-12-10 01:40:20 -06:00
Wesley Wolfe
4d2a92ed47 Add isSolid() tests for each material 2012-12-09 18:15:34 -06:00
feildmaster
12c7c2f695 Implement FurnaceExtractEvent. Adds BUKKIT-2114 2012-12-08 03:58:34 -06:00
feildmaster
e760d6eb31 Add SlotFurnaceResult for diff visibility 2012-12-08 02:45:50 -06:00