Fixes #13
This commit is contained in:
parent
fd9332cc54
commit
c90bebecf9
|
@ -282,6 +282,9 @@ public class EntityTamableFox extends EntityFox {
|
||||||
this.goalSit.setSitting(!this.isSitting());
|
this.goalSit.setSitting(!this.isSitting());
|
||||||
return flag;
|
return flag;
|
||||||
} else if (entityhuman.isSneaking()) { // Swap/Put/Take item from fox.
|
} 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()) {
|
if (!this.getEquipment(EnumItemSlot.MAINHAND).isEmpty()) {
|
||||||
getBukkitEntity().getWorld().dropItem(getBukkitEntity().getLocation(), CraftItemStack.asBukkitCopy(this.getEquipment(EnumItemSlot.MAINHAND)));
|
getBukkitEntity().getWorld().dropItem(getBukkitEntity().getLocation(), CraftItemStack.asBukkitCopy(this.getEquipment(EnumItemSlot.MAINHAND)));
|
||||||
this.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.AIR));
|
this.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.AIR));
|
||||||
|
|
|
@ -14,11 +14,8 @@ import java.lang.reflect.Modifier;
|
||||||
|
|
||||||
// @TODO:
|
// @TODO:
|
||||||
|
|
||||||
/* @CHANGELOG (1.6.0):
|
/* @CHANGELOG (1.6.0-SNAPSHOT):
|
||||||
* Code cleanup.
|
* Fix a bug of duplicating water/lava buckets.
|
||||||
* 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
|
|
||||||
*/
|
*/
|
||||||
public final class TamableFoxes extends JavaPlugin implements Listener {
|
public final class TamableFoxes extends JavaPlugin implements Listener {
|
||||||
private static TamableFoxes plugin;
|
private static TamableFoxes plugin;
|
||||||
|
|
Loading…
Reference in New Issue