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>
The name is misleading, as it can be misconstrued to mean "a sync"
instead of properly understanding it as "an async"
By: Wesley Wolfe <weswolf@aol.com>
Non-living entities can change blocks, specifically falling blocks. This change is a small source break, but mainly a byte-code break (requires plugins to recompile).
By: Wesley Wolfe <weswolf@aol.com>
If you use BlockFace in any way, to compensate the directionals being incorrect, you can still have backwards compatibility if you add in the handling in your plugin:
boolean legacyBlockFace = BlockFace.NORTH().getModX() == -1; (and then handle it accordingly)
If you didn't special case your directions to fix what's being fixed here... Hurray! Your plugin should now work.
By: feildmaster <admin@feildmaster.com>
Reobtaining a constructor is not a trivial operation, this change makes the Material enum store the respective constructors for each MaterialData.
Additionally 'fixed' the material tests to use proper generics.
By: Darth Android <darthandroid@gmail.com>
These methods were never intended to be overwritten, and bukkit relies
on their internal functionality. Additionally, the methods were inlined
in JavaPlugin, but the finality maintains intention.
By: Wesley Wolfe <weswolf@aol.com>
EXPLOSION is used when a hanging entity is removed by an explosion.
DEFAULT is used when a hanging entity is removed by an uncategorised
cause.
By: EvilSeph <evilseph@gmail.com>
These numbers are mirrored in vanilla code as the coordinate limits for
a world. Replaced usages to a static final member for code readability.
By: Wesley Wolfe <weswolf@aol.com>
Two potion types were missing from the 1.4.2 update. Invisibility and
night vision are now in the potion type enum.
Fixes an erroneous use of PotionEffectType.SPEED where it should have
been WEAKNESS.
Removed deprecation for the PotionEffectType relating to certain effects
that are now active in 1.4.2.
Fixes BUKKIT-2677, BUKKIT-2758.
By: Wesley Wolfe <weswolf@aol.com>
As well as adding methods for ItemFrames, this moves some methods
previously contained in Painting to Hanging, as they are shared by both
classes.
An enum was added that represents rotations, similar to a clock-face.
This is needed as a contrast to cardinal direction based rotations.
By: h31ix <effectsdude@gmail.com>