This commit is contained in:
SeanOMik 2020-05-03 12:36:56 -05:00
parent fd9332cc54
commit c90bebecf9
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
2 changed files with 5 additions and 5 deletions

View File

@ -282,6 +282,9 @@ public class EntityTamableFox extends EntityFox {
this.goalSit.setSitting(!this.isSitting());
return flag;
} else if (entityhuman.isSneaking()) { // Swap/Put/Take item from fox.
// Ignore buckets since they can be easily duplicated.
if (itemstack.getItem() == Items.BUCKET || itemstack.getItem() == Items.LAVA_BUCKET || itemstack.getItem() == Items.WATER_BUCKET) return true;
if (!this.getEquipment(EnumItemSlot.MAINHAND).isEmpty()) {
getBukkitEntity().getWorld().dropItem(getBukkitEntity().getLocation(), CraftItemStack.asBukkitCopy(this.getEquipment(EnumItemSlot.MAINHAND)));
this.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.AIR));

View File

@ -14,11 +14,8 @@ import java.lang.reflect.Modifier;
// @TODO:
/* @CHANGELOG (1.6.0):
* Code cleanup.
* Fixed low TPS issues. (If you run into any please DM me or create a github issue)
* When you tame a fox you now get the taming advancement.
* Added support for color codes in language.yml
/* @CHANGELOG (1.6.0-SNAPSHOT):
* Fix a bug of duplicating water/lava buckets.
*/
public final class TamableFoxes extends JavaPlugin implements Listener {
private static TamableFoxes plugin;