Commit graph

3225 Commits

Autor SHA1 Nachricht Datum
t00thpick1
3c209a9884 [Bleeding] Fix crash involving horse passengers. Fixes BUKKIT-5212
Setting a horse's passenger to a non-living entity will cause a
server crash when the horse ticks, we need to check that it is
a living entity before casting, and skip otherwise.
2013-12-20 23:37:57 -06:00
t00thpick1
9bc3b7df24 [Bleeding] Call event when reflecting fireballs. Adds BUKKIT-5214 2013-12-20 23:37:56 -06:00
t00thpick1
624603cd41 [Bleeding] Send short version string on ping. Addresses BUKKIT-5206
With the update in 1.7 that improved the server ping, it was made to
include a long version string for CraftBukkit. This value is too long
for proper display so we now send a shortened string consisting of
the server implementation and the minecraft version.
2013-12-20 23:37:56 -06:00
EvilSeph
dfcff7eabf Account for different reach limit in Survival/Creative. Fixes BUKKIT-4257
When we first added the reach limiter in CraftBukkit there was no
difference between how far the client could reach in vanilla while in
Survival or Creative. At some point in Minecraft's cycle Creative was
given a block extra to work with and our protection was not updated to
account for this. We need to respect the possibility of different game
modes in Minecraft providing the client with varying reach distances.
2013-12-20 23:38:18 -05:00
EvilSeph
6d9a6fbb4b Fix attributes not clearing on death. Fixes BUKKIT-5213
Due to an incorrect mapping of this method to a friendly name, we're
unfortunately calling the wrong method within EntityPlayer.reset() to
reset attributes. Instead of what we've mapped as "removeAllEffects", we
should be calling EntityLiving.aP(). This mapping should be corrected in
the next naming version.
2013-12-20 15:33:06 -05:00
EvilSeph
330dbbf78c Updated version to 1.7.2-R0.2-SNAPSHOT for development towards next release. 2013-12-18 01:01:25 -05:00
EvilSeph
bda2179ae9 Updated version to 1.7.2-R0.1 in pom.xml for Beta. 2013-12-18 00:23:43 -05:00
t00thpick1
3cd64185a9 [Bleeding] Correctly generate torches on portal. Fixes BUKKIT-746
In the CraftBlockState implementation, updating the blockstate onto
a block will force the block state data value onto the block.
Unlike vanilla which relied on block data being set when the type
changed, we must instead explicitely set the data in the blockstate.
2013-12-17 22:29:12 -05:00
Nate Mortensen
8da5126282 Add new setResourcePack method. Fixes BUKKIT-5015
Minecraft now uses resource packs instead of texture packs, which broke
the setTexturePack method, as the client no longer listens on the MC|TPack
channel.

This commit fixes the issue by adding in a setResourcePack method, and by
deprecating setTexturePack and rewriting it to call the newly added
setResourcePack.  In order to simplify the method and prevent this from
happening in the future, setResourcePack calls EntityPlayer.a(String) to use
the same logic as minecraft when sending resource packs.
2013-12-17 20:17:38 -07:00
mbax
091fb2ea9e Process URLs as clickable. Adds BUKKIT-4917
In Minecraft 1.7, URL processing was removed from the client while the
server gained the ability to designate a URL to be launched in response to
clicking text. However, this functionality is not implemented in the
vanilla server. This commit adds that functionality to messages sent to
the client, processing URLs as clickable.

Additionally, char array iteration is replaced with regex.
2013-12-17 21:15:11 -05:00
Travis Watkins
0f48e9b06d Check pending blocks before falling back to world. Fixes BUKKIT-5122
When growing trees we use a BlockChangeDelegate which queues up the block
changes so plugins can modify/block/log tree growing. However, we always
check the actual world when checking for existing blocks. This means when
the tree growing code checks to see if putting a leaf in a block is valid
it may incorrectly overwrite a log block that should exist in that
location. To ensure trees grow correctly we now check the delegate itself
for blocks that match the queried location before checking the world.
2013-12-17 17:36:49 -06:00
EvilSeph
4f63a5f255 Fix mistranslation issue for PlayerToggleFlightEvent. Fixes BUKKIT-5172
Thanks for pointing it out RingOfStorms!
2013-12-17 18:05:56 -05:00
frymaster
fbdc3a7a74 Remove references to chunklist. Fixes BUKKIT-5190
Commit c576054539790bdeb35285f62863d74b48c0782d removed the chunklist
collection stored in ChunkProviderServer, however it has been partially
restored in some places by 7e1ac0a77129b169704c1e222ff2deb3ab6cd2d2. As
not all references to this were restored, this has caused the chunklist
and chunks collections to become out of sync, resulting in a memory leak.

This commit removes chunklist from ChunkProviderServer again.
2013-12-17 16:55:57 -06:00
t00thpick1
0e809d8318 [Bleeding] Fix incorrect Cocoa Bean orientation. Addresses BUKKIT-5182
When ItemDye is used to place a Cocoa Block, the postPlace() method
should not be called, as data is handled within the ItemDye class.
However, if Cocoa is placed via its block item, postPlace() should
still be called to mirror vanilla behavior.
2013-12-17 16:49:38 -06:00
BlackHole
9a6d035998 Add missed tree types for Minecraft 1.7. Adds BUKKIT-5042
This commit adds support for the Tree Types that weren't added in the
initial update to Minecraft 1.7.

Pulled from PR #1277
2013-12-16 19:47:49 -07:00
BlackHole
2191599f4b Fix generation of jungle trees. Fixes BUKKIT-5043
Due to changes in the generation of trees, the name of the class responsible
for the generation of jungle trees has changed from WorldGenMegaTree to
WorldGenJungleTree.  As such, references to WorldGenMegaTree need to be
updated to WorldGenJungleTree to generate the correct type of tree.

Pulled from PR #1277
2013-12-16 19:44:03 -07:00
GJ
cee6a7bab5 [Bleeding] Correct naming of sounds for 1.7. Fixes BUKKIT-5065
Several sounds were renamed in Minecraft 1.7, and have been updated
accordingly. Additionally, two sounds, HURT and BREATH, were removed from
Minecraft.
2013-12-16 19:32:29 -07:00
Travis Watkins
24ff27b408 Don't try to teleport to a null world. Fixes BUKKIT-5145 2013-12-14 17:23:34 -06:00
t00thpick1
a565486ee1 [Bleeding] Return correct drops for Cocoa blocks. Fixes BUKKIT-5159
For Cocoa Blocks, Block.getDropType() returns the item form of the Cocoa
block, rather than the Cocoa Bean item. Because of this, Cocoa blocks need
to have explicit handling in order to return the proper drop contents.
2013-12-13 22:42:39 -07:00
GJ
1ff8132bdd [Bleeding] Fix witches dropping empty ItemStacks on death. Fixes BUKKIT-3554 2013-12-13 22:21:12 -07:00
GJ
a0e50c36b9 [Bleeding] Fix Blazes not firing death events. Fixes BUKKIT-4898
Previously, due to the way that death events were called, Blazes only
fired death events when they dropped loot. This change fixes that,
enabling death events for Blazes whenever they die, regardless of loot
drops.
2013-12-13 22:21:11 -07:00
t00thpick1
ae9cd0729e [Bleeding] Call EntityTargetEvent for EnderDragons. Fixes BUKKIT-5160
EnderDragons did not call an EntityTargetEvent when they
were targeting random players in the End.  This commit
adds that event call into the targeting code.
2013-12-13 22:20:39 -07:00
t00thpick1
1154484815 Do not fire EntityDamageEvent for explosions twice. Fixes BUKKIT-5156
Explosions directly caused by LivingEntities, such as creepers and tnt lit
by players, have their EntityDamageEvent explicitely handled within
the Explosion class.  In order to prevent double events when damage
is handled for other DamageSources, we need return null for explosion
based damage sources.
2013-12-13 20:05:36 -07:00
t00thpick1
c2a0396af2 Throw event when EnderCrystals harm EnderDragon. Fixes BUKKIT-4052
The EntityLiving dealDamage method will not call an event for the
entity damage caused by an explosion without an associated
entity cause, therefore, the explosion caused by EnderCrystals
needs to be explicitely handled within the EnderDragon class.
2013-12-13 20:05:35 -07:00
t00thpick1
e6bccf6bfd Re-add WorldLoadEvent lost in 314051580a0a8e4745d3a539f232b552916eb302 Fixes BUKKIT-5125
In the 1.4.2 update for CraftBukkit, a missed diff resulted in the
WorldLoadEvent no longer being fired for the worlds loaded on
startup.
2013-12-13 20:05:35 -07:00
t00thpick1
1460f250cf Alter fall particles to respect visibility API. Fixes BUKKIT-5158
Bukkits Visibility API should prevent players from seeing fall particles
of players that they cannot see.  This commit alters the handling to
provide an EntityPlayer argument that is later used to determine if they
are visible.
2013-12-13 20:05:19 -07:00
t00thpick1
bdbd1808f7 Show fall particles while in creative mode. Fixes BUKKIT-5009
Relocate CraftBukkit patch to fall damage when changing
gamemode from creative mode.
2013-12-13 18:51:13 -07:00
Travis Watkins
fbe062caf5 Only filter data from block items, not all of them. Fixes BUKKIT-5047 2013-12-13 18:52:33 -06:00
Travis Watkins
f5fad449bd Call interact event if block cannot be punched. Fixes BUKKIT-5126
We do ray tracing on arm swings to filter out swings that hit blocks since
punching blocks has its own event handling. However, some blocks cannot
be punched so the air interact type is still valid for them. Luckily
these blocks all have a means to query them so add an additional check
for this and don't fail the check for them.
2013-12-12 02:01:22 -06:00
Wesley Wolfe
ca4c118994 Rework furnace result log. Fixes BUKKIT-5115
This changes the logic for furnace smelt event to consider a result of
null (read: air / invalid), which will still consume an item. It also
properly considers item meta in the result, instead of only checking the
item data value.
2013-12-10 16:21:09 -06:00
Travis Watkins
f5f71a5502 Print message on startup before loading log4j
Log4j takes a long time to load on startup. Before it loads, the server
appears to have frozen as there is no output until after. We now print
a loading message before this happens to let the user know the server
is actually working.
2013-12-09 14:12:34 -06:00
Travis Watkins
772867eb51 Call event when pistons push an item frame/painting. Fixes BUKKIT-5110
When pistons push/pull blocks they call Entity.move(float, float) to move
entities out of their path. For hanging entities this code path makes them
simply die and drop as an item. We now call an event in this scenario so
plugins can control this behavior.
2013-12-09 13:43:02 -06:00
Travis Watkins
305e5f4f08 Handle null damage events for item frames. Fixes BUKKIT-5114
Some types of damage are handled specially so do not end up returning an
event in handleEntityDamageEvent. To ensure we don't have problems with
these we need to check for them and simply ignore them, as they've been
handled already.
2013-12-09 13:40:52 -06:00
Alex Ciuba
80935e5c2b Don't consume bonemeal if there is no crop present. Fixes BUKKIT-3790
Bonemeal dispense behavior already took care of decrementing the item
stack, therefore we shouldn't manage the size manually.

Pulled from PR #1172
2013-12-08 23:21:11 -06:00
t00thpick1
0aa187f151 [Bleeding] Ignore Block Physics in Chunk population. Fixes BUKKIT-4923
Suppressing physics updates during Chunk population prevents
infinite recursion due to custom Block Populators editing border
blocks on chunks.
2013-12-08 22:39:50 -06:00
BlackHole
c7b4514ad3 Call BlockPlaceEvent for cocoa beans planted on log. Adds BUKKIT-5039
The behavior of cocoa are now aligned to be the same as other plants.

Pulled from PR #1281
2013-12-08 21:47:26 -06:00
Starbuck Johnson
36ef37b982 Call EntityDamageEvent on ItemFrame item removal. Fixes BUKKIT-5020
Calling this event allows plugins to react to the situation by simply
handling a normal damage event, possibly using existing code to
handle other entity damage.

Pulled from PR #1279
2013-12-08 20:58:27 -06:00
Starbuck Johnson
3cf569a33f Added EntityItemFrame.java for diff visibility 2013-12-08 20:31:38 -06:00
Kodekpl
431e5ea442 Set proper position of snow block. Fixes BUKKIT-5004
Missed diffs when updating to 1.7.

Pulled from PR #1278
2013-12-08 20:26:37 -06:00
AlphaBlend
ff0da6bad5 Fix BlockPhysicsEvent having incorrect changed type. Fixes BUKKIT-5063
This change updates the reference to the local variable representing the
block being checked when calling BlockPhysicsEvent.
2013-12-07 21:34:50 -07:00
t00thpick1
6f4d9bea2b [Bleeding] Correctly generate giant mushrooms. Fixes BUKKIT-5066
This change fixes the reference to the local variables representing the
block position during large mushroom generation.
2013-12-07 20:31:04 -06:00
feildmaster
97cb46f9f8 Reintroduce disconnection flag that was removed in 1.7 update. 2013-12-06 21:34:06 -06:00
Wesley Wolfe
70747ca28b Follow vanilla settings behavior. Fixes BUKKIT-5069
A vanilla server does a series of checks for the client black-listing
certain chat types (commands or chat). This change changes a CB
whitelist to the vanilla blacklist behavior.
2013-12-06 16:44:32 -06:00
Wesley Wolfe
dc86362c9a Implement Firework.detonate(). Adds BUKKIT-4538
This implements the detonate method from bukkit by setting the fuse
timer to 0. This makes a firework explode using the normal codepath,
but without waiting for the fuse.
2013-12-06 00:05:23 -06:00
feildmaster
8a29829d1a Correctly register Furnace Recipies. Fixes BUKKIT-5044
We should also use items, not blocks. :)
2013-12-05 14:37:14 -06:00
GJ
b880a2d24c Add new fishing enchants. Fixes BUKKIT-5035 2013-12-04 21:17:54 -07:00
t00thpick1
e5353b82a7 Correctly validate map colors. Fixes BUKKIT-4984
The validation check in CraftMapView.render(CraftPlayer) filters out any
values less than 0. As of Minecraft 1.7, -128 through -113 are valid colors,
so filtering them out prevents some of the new colors from being sent.

This commit fixes the issue by adjusting the validation check to include
any values less than or equal to -113.  As the minimum value for a byte is
-128, no invalid colors are included.
2013-12-03 18:56:36 -07:00
Travis Watkins
169fd46960 Finish kicking player before letting their clone in. Fixes BUKKIT-4960 2013-12-03 19:21:27 -06:00
Travis Watkins
bc0ac48074 Try to detect when to disable jline automatically. Fixes BUKKIT-5028 2013-12-03 11:21:26 -06:00
Nate Mortensen
39719fff74 Maintain old setType method in WorldGenerator. Fixes BUKKIT-4915
WorldGenerator setType and setTypeAndData have their arguments changed to
add in support for CraftBlockChangeDelegate, which changes the method
signature. This change in the method signature breaks any WorldGenerators
that aren't modified to use CraftBlockChangeDelegate.

This commit fixes the issue by readding the old method and maintaining the
CraftBlockChangeDelegate method.  This makes it so that there is a
compatible method for both  CraftBlockChangeDelegate WorldGenerators and
unmodified WorldGenerators.

Additionally, this commit reduces and corrects the diffs in
WorldGenerator, moving the fix for layering violations to
CraftBlockChangeDelegate.
2013-12-02 21:03:57 -07:00