Commit graph

3225 Commits

Autor SHA1 Nachricht Datum
feildmaster
a4892dfa72 Delegate recreateStructures to nms provider. Fixes BUKKIT-2760
This was a miss when updating to 1.4.2
2012-11-01 21:32:28 -05:00
Wesley Wolfe
1c14586c49 Add CraftArt mappings for Wither. Fixes BUKKIT-2667.
The static assertions are not normally evaluated in the JVM, and failed
to fail when the enums went from size 25 to size 26. This meant missing
values would not be detected at runtime and instead return null,
compounding problems later. The switches should never evaluate to null
so will instead throw runtime assertion errors.

Additional unit tests were added to detect new paintings and assure they
have proper, unique mappings. The test checks both that a mapping
exists, is not null, and does not duplicate another mapping.
2012-11-01 03:06:47 -05:00
Wesley Wolfe
9a88e615d4 Change ItemFrame to actually provide a defensive copy. Fixes BUKKIT-2784
If a defensive copy is not used in the API, changes to the item are
reflected in memory, but never updated to the client. It also goes
against the general contract provided in Bukkit, where setItem should be
the only way to change the underlying item frame.
2012-11-01 01:34:54 -05:00
EvilSeph
1fb3164a96 Updated version to 1.4.2-R0.2-SNAPSHOT for development towards next release. 2012-10-31 20:51:53 -04:00
EvilSeph
b9486da5c4 Updated version to 1.4.2-R0.1 in pom.xml for Beta. 2012-10-31 15:59:34 -04:00
EvilSeph
1623bf0f9b Fire HangingBreakEvent when explosions remove hanging entities. Fixes BUKKIT-2764 2012-10-31 14:24:03 -04:00
Travis Watkins
87a1cd3d43 Add inventory and slot types for new containers. Fixes BUKKIT-2741 2012-10-31 13:25:53 -04:00
Travis Watkins
347fd3cb6e Fix NPE when blowing up an item frame. Fixes BUKKIT-2763 2012-10-31 13:09:57 -04:00
Travis Watkins
f479aa84a4 Implement API for ambient mob spawn limit. Add spawn-limit.ambient to
bukkit.yml. Adds BUKKIT-2765
2012-10-31 13:01:48 -04:00
Travis Watkins
46d7cd1e05 Use BlockCommandSender for dispatching Command block commands
Also allow commands that don't start with a / to match vanilla behavior
2012-10-31 06:37:46 -05:00
feildmaster
9e4e2c62af Expose API for managing and using GameRules. Adds BUKKIT-2757 2012-10-31 03:40:43 -04:00
Travis Watkins
59dc403a61 Hook command block up to ConsoleCommandSender. Fixes BUKKIT-2684
This will need to have its own CommandSender but this makes command blocks
work for now with any command console can run.
2012-10-31 02:39:56 -05:00
h31ix
63eaf74d44 Implement the API for ItemFrames. Adds BUKKIT-2668 2012-10-31 01:18:59 -05:00
h31ix
02ca9be079 [Bleeding] Fire damage is no longer a valid reason for hanging entity removal 2012-10-31 00:45:47 -04:00
h31ix
54cce5bf92 [Bleeding] Implement new Hanging events. Adds BUKKIT-2754 2012-10-31 00:21:31 -04:00
EvilSeph
4efd06a6b5 Remove Anvil debug. Fixes BUKKIT-2732 2012-10-30 19:11:34 -04:00
md_5
42391009f7 [Bleeding] Prevent players from appearing to be sneaking after they change dimensions whilst doing so. 2012-10-30 19:11:34 -04:00
EvilSeph
b7886d1421 Disable portal support for entities for now. Restore allowNether check.
Relates to:
BUKKIT-2695 BUKKIT-2675
2012-10-30 19:11:33 -04:00
EvilSeph
6bf705dd08 Expose API for clearing a player's inventory with a successful count
return. Adds BUKKIT-2745
2012-10-30 04:55:02 -04:00
feildmaster
856fdc2ab6 Update map cursors to reflect 1.4 changes. Fixes BUKKIT-2740 2012-10-29 23:29:40 -04:00
EvilSeph
3047a424bb Expose API for giving and taking experience levels for use with ExpCommand's new behaviour with Minecraft 1.4. Adds BUKKIT-2739 2012-10-29 23:18:37 -04:00
feildmaster
aba7e2faf1 Revert changing EntityType.FIREBALL to LARGE_FIREBALL 2012-10-29 20:17:52 -05:00
Travis Watkins
216cddb2ab Get skull data before destroying block. Fixes BUKKIT-2723
Skull blocks store their type in a tile entity and use their block data
as rotation. When breaking a block the block data is used for determining
what item to drop. Simply changing this to use the skull method for getting
their drop data is not enough because their tile entity is already gone.
Therefore we have to special case skulls to get the correct data _and_ get
that data before breaking the block.
2012-10-29 12:54:16 -05:00
EvilSeph
14f4bd9024 Fix bug preventing non bed-reliant spawns from being successfully set. Fixes BUKKIT-2708 2012-10-29 04:56:30 -04:00
Travis Watkins
d16f8c5e65 Drop skulls like every other block. Fixes BUKKIT-2678
Instead of having a special case for skulls just use the normal logic for
breaking a block. This avoids issues when interacting with API.
2012-10-29 02:28:27 -05:00
EvilSeph
f4cdf8fe98 Add isHardcore API to check if the server is in hardcore mode or not. Adds BUKKIT-2707 2012-10-29 01:46:14 -04:00
EvilSeph
442b7a69f1 Prevent health from wrapping around. 2012-10-28 23:55:40 -04:00
h31ix
db49a57694 Update PotionEffects on player death. Fixes BUKKIT-2673
On player death player PotionEffects need to be updated so that a player's
invisibility and other effects are removed, otherwise they will persist
after a respawn. This is a carry-over from our use of persistent player
entities.
2012-10-28 23:27:02 -04:00
Travis Watkins
0fb806c566 Clamp difficulty levels to prevent invalid values
Some features added in 1.4.2 use the difficulty value as an index to an
array so while before having it set to an invalid value would do nothing
or maybe cause an odd side effect somewhere it now crashes the server. This
patch ensures difficulty values are clamped between 0 and 3, inclusive.
2012-10-28 10:07:11 -05:00
Travis Watkins
37a0d6757d Don't filter item data for anvils. Fixes BUKKIT-2640
Filtering item data is usually a good idea to make sure we don't have
invalid data or data on items that shouldn't have it. However, anvils
use item data in slightly different way and so running its code for
filtering here causes the data to be corrupted.
2012-10-28 09:37:47 -05:00
Travis Watkins
9841b77009 Use correct variable for squid Y motion. Fixes BUKKIT-2648 2012-10-28 03:23:48 -05:00
Travis Watkins
c675cc0b3b Fix missed rename for ore exp dropping. Fixes BUKKIT-2662 2012-10-28 02:43:23 -05:00
Travis Watkins
d97d193b91 Add new entities to World.spawn method. Fixes BUKKIT-2658 2012-10-28 02:21:34 -05:00
h31ix
788e9e84cf Fix incorrect method names missed during update. Fixes BUKKIT-2653
A couple method names were changed between 1.3.2 and 1.4.2 but were missed
in the update. One of these affects being able to enchant bows and the
other is used for updating player animations while firing.
2012-10-28 03:06:59 -04:00
EvilSeph
11d65171cd These books are too powerful! 2012-10-28 03:05:28 -04:00
EvilSeph
784f9e31a8 Remove spawn-radius setting in bukkit.yml in favour of spawn-protection in
server.properties. Fixes BUKKIT-2657
2012-10-28 01:55:27 -04:00
EvilSeph
5fe8523023 Fixed generator-settings not being set. Fixes BUKKIT-2652 2012-10-28 01:00:28 -04:00
Travis Watkins
5469311a36 Don't pass vanilla plugin channels to plugins. Fixes BUKKIT-2638
Vanilla has its own handlers for plugin channel messages for things like
texture packs, books, and anvils. When vanilla handles one of these messages
we should not also pass it to plugins because they will be duplicating work
and potentially running in to situations our plugin system isn't setup to
handle. This is how 1.3.2 worked but was lost in the 1.4.2 update.
2012-10-27 23:25:10 -05:00
Travis Watkins
60819c6693 Update CraftBukkit to Minecraft 1.4(.2). 2012-10-27 22:19:03 -04:00
EvilSeph
b9a72531b6 Updated version to 1.3.2-R3.0 in pom.xml for RB. 2012-10-27 21:10:46 -04:00
EvilSeph
df7f86d028 Made books less powerful, though you should still read them! 2012-10-27 20:44:16 -04:00
EvilSeph
bd6c824c11 Updated version to 1.3.2-R2.1-SNAPSHOT for development towards next release. 2012-10-17 07:36:44 -04:00
EvilSeph
46f773a685 Updated version to 1.3.2-R2.0 in pom.xml for RB. 2012-10-17 07:30:23 -04:00
Wesley Wolfe
4166af1d3a Implement chat tab completion API. Fixes BUKKIT-2608. Adds BUKKIT-2607.
The chat tab completion implementation also includes a sanity check to
assure type-safety in the list.
2012-10-17 04:31:36 -05:00
Score_Under
3ce954bb86 Delegate tab-completion. Fixes BUKKIT-2181. Adds BUKKIT-2602
CommandMap now contains the functionality for tab completion. This
commit replaces the vanilla implementation and simply delegates it to
the Bukkit API.
2012-10-15 03:18:59 -05:00
Wesley Wolfe
05e889f346 Queue tasks from secondary threads. Fixes BUKKIT-2546 and BUKKIT-2600
This change affects the old chat compatibility layer from an
implementation only standpoint. It does not queue the 'event' to fire,
but rather queues a runnable that allows the calling thread to wait for
execution to finish.

The other effect of this change is that rcon connects now have their
commands queued to be run on next server tick using the same
implementation.

The internal implementation is in org.bukkit.craftbukkit.util.Waitable.
It is very similar to a Future<T> task, but only contains minimal
implementation with object.wait() and object.notify() calls
under the hood of waitable.get() and waitable.run().

PlayerPreLoginEvent now properly implements thread-safe event execution
by queuing the events similar to chat and rcon. This is still a poor way
albeit proper way to implement thread-safety; PlayerPreLoginEvent will
stay deprecated.
2012-10-14 17:26:53 -05:00
Wesley Wolfe
93a79cd0e6 Implement new scheduler API. Adds BUKKIT-836
The implementation for the new methods mimics the old methods. The final
call for the old methods now maps to the new methods with an additional
call to get id.
2012-10-14 01:21:58 -05:00
Travis Watkins
506a1a0765 Ensure entity isn't destroyed when trying to show it. Fixes BUKKIT-2038
If two players (or a player and any other entity) are teleported to the
same location in the same tick they will both get added to the other's
destroy queue then have a new entity spawn packet sent. Next tick the
destroy queue will be processed and they will then be invisible to each
other. To prevent this situation we remove the entity from the destroy
queue when sending out a spawn packet for them.
2012-10-13 15:27:45 -05:00
EvilSeph
cb2f8244e9 Updated version to 1.3.2-R1.1-SNAPSHOT for development towards next release. 2012-09-28 16:34:17 -04:00
EvilSeph
9796049536 Updated version to 1.3.2-R1.0 in pom.xml for RB. 2012-09-28 16:31:23 -04:00