Fixed an error, now works for 1.11.1, no idea what the piggy is for
This commit is contained in:
parent
e1cd672207
commit
fb05441f78
@ -162,6 +162,8 @@ public class FlagType<Y> {
|
|||||||
public static FlagType<ItemStack> FIREWORK_ITEM = new FlagType<ItemStack>(FireworkWatcher.class, 0,
|
public static FlagType<ItemStack> FIREWORK_ITEM = new FlagType<ItemStack>(FireworkWatcher.class, 0,
|
||||||
new ItemStack(Material.AIR));
|
new ItemStack(Material.AIR));
|
||||||
|
|
||||||
|
public static FlagType<Integer> FIREWORK_ATTACHED_ENTITY = new FlagType<Integer>(FireworkWatcher.class, 1, 0);
|
||||||
|
|
||||||
public static FlagType<Integer> FISHING_HOOK_HOOKED = new FlagType<Integer>(FishingHookWatcher.class, 0, 0);
|
public static FlagType<Integer> FISHING_HOOK_HOOKED = new FlagType<Integer>(FishingHookWatcher.class, 0, 0);
|
||||||
|
|
||||||
public static FlagType<Boolean> GHAST_AGRESSIVE = new FlagType<Boolean>(GhastWatcher.class, 0, false);
|
public static FlagType<Boolean> GHAST_AGRESSIVE = new FlagType<Boolean>(GhastWatcher.class, 0, false);
|
||||||
@ -181,8 +183,6 @@ public class FlagType<Y> {
|
|||||||
public static FlagType<Optional<UUID>> HORSE_OWNER = new FlagType<Optional<UUID>>(AbstractHorseWatcher.class, 1,
|
public static FlagType<Optional<UUID>> HORSE_OWNER = new FlagType<Optional<UUID>>(AbstractHorseWatcher.class, 1,
|
||||||
Optional.<UUID> absent());
|
Optional.<UUID> absent());
|
||||||
|
|
||||||
// public static FlagType<Integer> HORSE_VARIANT = new FlagType<Integer>(HorseWatcher.class, 0, 0);
|
|
||||||
|
|
||||||
public static FlagType<Byte> INSENTIENT_META = new FlagType<Byte>(InsentientWatcher.class, 0, (byte) 0);
|
public static FlagType<Byte> INSENTIENT_META = new FlagType<Byte>(InsentientWatcher.class, 0, (byte) 0);
|
||||||
|
|
||||||
public static FlagType<Byte> IRON_GOLEM_PLAYER_CREATED = new FlagType<Byte>(IronGolemWatcher.class, 0, (byte) 0);
|
public static FlagType<Byte> IRON_GOLEM_PLAYER_CREATED = new FlagType<Byte>(IronGolemWatcher.class, 0, (byte) 0);
|
||||||
@ -224,6 +224,8 @@ public class FlagType<Y> {
|
|||||||
|
|
||||||
public static FlagType<Boolean> PIG_SADDLED = new FlagType<Boolean>(PigWatcher.class, 0, false);
|
public static FlagType<Boolean> PIG_SADDLED = new FlagType<Boolean>(PigWatcher.class, 0, false);
|
||||||
|
|
||||||
|
public static FlagType<Integer> PIG_UNKNOWN = new FlagType<Integer>(PigWatcher.class, 1, 0);
|
||||||
|
|
||||||
public static FlagType<Float> PLAYER_ABSORPTION = new FlagType<Float>(PlayerWatcher.class, 0, 0F);
|
public static FlagType<Float> PLAYER_ABSORPTION = new FlagType<Float>(PlayerWatcher.class, 0, 0F);
|
||||||
|
|
||||||
public static FlagType<Byte> PLAYER_HAND = new FlagType<Byte>(PlayerWatcher.class, 3, (byte) 0);
|
public static FlagType<Byte> PLAYER_HAND = new FlagType<Byte>(PlayerWatcher.class, 3, (byte) 0);
|
||||||
|
@ -32,4 +32,12 @@ public class FireworkWatcher extends FlagWatcher {
|
|||||||
sendData(FlagType.FIREWORK_ITEM);
|
sendData(FlagType.FIREWORK_ITEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAttachedEntity(int entityId) {
|
||||||
|
setData(FlagType.FIREWORK_ATTACHED_ENTITY, entityId);
|
||||||
|
sendData(FlagType.FIREWORK_ATTACHED_ENTITY);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAttachedEntity() {
|
||||||
|
return getData(FlagType.FIREWORK_ATTACHED_ENTITY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,22 +3,27 @@ package me.libraryaddict.disguise.disguisetypes.watchers;
|
|||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.FlagType;
|
import me.libraryaddict.disguise.disguisetypes.FlagType;
|
||||||
|
|
||||||
public class PigWatcher extends AgeableWatcher
|
public class PigWatcher extends AgeableWatcher {
|
||||||
{
|
|
||||||
|
|
||||||
public PigWatcher(Disguise disguise)
|
public PigWatcher(Disguise disguise) {
|
||||||
{
|
|
||||||
super(disguise);
|
super(disguise);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSaddled()
|
public boolean isSaddled() {
|
||||||
{
|
|
||||||
return (boolean) getData(FlagType.PIG_SADDLED);
|
return (boolean) getData(FlagType.PIG_SADDLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSaddled(boolean isSaddled)
|
public void setSaddled(boolean isSaddled) {
|
||||||
{
|
|
||||||
setData(FlagType.PIG_SADDLED, isSaddled);
|
setData(FlagType.PIG_SADDLED, isSaddled);
|
||||||
sendData(FlagType.PIG_SADDLED);
|
sendData(FlagType.PIG_SADDLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getUnknown() {
|
||||||
|
return getData(FlagType.PIG_UNKNOWN);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnknown(int unknown) {
|
||||||
|
setData(FlagType.PIG_UNKNOWN, unknown);
|
||||||
|
sendData(FlagType.PIG_UNKNOWN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -995,7 +995,7 @@ public class DisguiseUtilities {
|
|||||||
if (DisguiseConfig.getPushingOption() != DisguisePushing.IGNORE) {
|
if (DisguiseConfig.getPushingOption() != DisguisePushing.IGNORE) {
|
||||||
// Code to stop player pushing in 1.9
|
// Code to stop player pushing in 1.9
|
||||||
Scoreboard scoreboard = player.getScoreboard();
|
Scoreboard scoreboard = player.getScoreboard();
|
||||||
Team team = scoreboard.getTeam(prevTeam);
|
Team team = prevTeam == null ? null : scoreboard.getTeam(prevTeam);
|
||||||
Team ldTeam = scoreboard.getEntryTeam(player.getName());
|
Team ldTeam = scoreboard.getEntryTeam(player.getName());
|
||||||
|
|
||||||
if (ldTeam != null) {
|
if (ldTeam != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user