Jump to content

[PMC] PvHorse protection on PvE?


schererererer

Recommended Posts

I haven't gotten a chance to check this out myself, but I've been told that horses are damageable by players while being ridden. Given that owned horses are basically invincible while not being ridden, I feel like this is maybe an oversight? Is it technically feasible to remove the ability for players to damage ridden horses on P?

Link to comment
Share on other sites

The invincibility of horses when not being ridden was a feature implemented as a grief prevention measure.  I imagine it is very much possible to make horses invulnerable even when being ridden, but my first reaction is that the impossibility of killing horses would mean players would be riding on an unkillable steed (can traverse normally dangerous terrain with no consequence; kind of cheaty) and players would be unable to kill their tamed horses for whatever reason.

  • Upvote 1
Link to comment
Share on other sites

What I was thinking of was disabling the ability to kill ridden horses with swords and bows, but leave in environmental and mob damage. On a related note: it's a fairly unlikely situation, but if someone intentionally kills another player's horse, is an admin physically able to spawn a new horse with identical stats?

Link to comment
Share on other sites

dobreira was asking me these exact questions today, actually.

 

Allowing horses to be damaged while ridden is by design.  Perhaps the implementation could be improved for PvE by giving the option of disabling player-vs-horse damage for P.  The current mechanism was implemented with applicability to either S or P in mind.

 

It's not possible at this time to give an exact replacement of a horse.  I don't even know if there is a Bukkit API that enumerates those statistics, but we certainly don't log them.

Link to comment
Share on other sites

Hah, yeah, I told dobreira that I'd ask about it since I didn't know the answer to either question. That improved implementation would be nice for P in those rare but serious cases if someone maliciously kills a valuable horse. Since it's such an uncommon occurrence, it's not terribly pressing though.

Link to comment
Share on other sites

It's not possible at this time to give an exact replacement of a horse.  I don't even know if there is a Bukkit API that enumerates those statistics, but we certainly don't log them.

 

Looks like it's possible to obtain a jump strength value from a horse as well as its color and fur pattern (I think).  If memory serves me well, I think it's possible to get the horse's max HP from a method in the LivingEntity or Entity class.  Beyond that, I'm not sure how to get a speed stat on the horse :S (http://jd.bukkit.org/rb/apidocs/org/bukkit/entity/Horse.html)

Link to comment
Share on other sites

Following up on that: There is no API in Bukkit that allows us to get or set a horse's speed.  Since that functionality is not covered by the Bukkit API, we would have to resort to a plugin that manipulates the Mojang net.minecraft.server ("NMS") classes directly, which are specific to a particular version of Minecraft and therefore presents an additional obstacle to upgrading the server when a Bukkit build becomes available.  We are trying to avoid the use of NMS classes in our own code and avoid the use of plugins that use them because they take more time and effort to update with each new Minecraft version.

 

EDIT: buzzie and I must have been reading those API docs at more or less the same instant. =D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...