Weaken Declaration

This commit is contained in:
MattBDev 2016-04-06 00:17:30 -04:00
parent d49de5297b
commit 4dcac29028
7 changed files with 65 additions and 61 deletions

View File

@ -1,7 +1,8 @@
package com.plotsquared.bukkit.object.entity; package com.plotsquared.bukkit.object.entity;
public class AgeableStats { class AgeableStats {
public int age;
public boolean locked; int age;
public boolean adult; boolean locked;
boolean adult;
} }

View File

@ -1,16 +1,16 @@
package com.plotsquared.bukkit.object.entity; package com.plotsquared.bukkit.object.entity;
public class ArmorStandStats { class ArmorStandStats {
public final float[] head = new float[3]; final float[] head = new float[3];
public final float[] body = new float[3]; final float[] body = new float[3];
public final float[] leftLeg = new float[3]; final float[] leftLeg = new float[3];
public final float[] rightLeg = new float[3]; final float[] rightLeg = new float[3];
public final float[] leftArm = new float[3]; final float[] leftArm = new float[3];
public final float[] rightArm = new float[3]; final float[] rightArm = new float[3];
public boolean arms; boolean arms;
public boolean noplate; boolean noplate;
public boolean nogravity; boolean nogravity;
public boolean invisible; boolean invisible;
public boolean small; boolean small;
} }

View File

@ -1,12 +1,13 @@
package com.plotsquared.bukkit.object.entity; package com.plotsquared.bukkit.object.entity;
public class EntityBaseStats { class EntityBaseStats {
public EntityWrapper passenger;
public float fall; EntityWrapper passenger;
public short fire; float fall;
public int age; short fire;
public double v_z; int age;
public double v_y; double v_z;
public double v_x; double v_y;
double v_x;
} }

View File

@ -15,9 +15,6 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Guardian; import org.bukkit.entity.Guardian;
import org.bukkit.entity.Horse; import org.bukkit.entity.Horse;
import org.bukkit.entity.Horse.Color;
import org.bukkit.entity.Horse.Style;
import org.bukkit.entity.Horse.Variant;
import org.bukkit.entity.IronGolem; import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Item; import org.bukkit.entity.Item;
import org.bukkit.entity.ItemFrame; import org.bukkit.entity.ItemFrame;
@ -167,9 +164,9 @@ public class EntityWrapper {
this.horse = new HorseStats(); this.horse = new HorseStats();
this.horse.jump = horse.getJumpStrength(); this.horse.jump = horse.getJumpStrength();
this.horse.chest = horse.isCarryingChest(); this.horse.chest = horse.isCarryingChest();
this.horse.variant = getOrdinal(Variant.values(), horse.getVariant()); this.horse.variant = horse.getVariant();
this.horse.style = getOrdinal(Style.values(), horse.getStyle()); this.horse.style = horse.getStyle();
this.horse.color = getOrdinal(Color.values(), horse.getColor()); this.horse.color = horse.getColor();
storeTameable(horse); storeTameable(horse);
storeAgeable(horse); storeAgeable(horse);
storeLiving(horse); storeLiving(horse);
@ -546,9 +543,9 @@ public class EntityWrapper {
Horse horse = (Horse) entity; Horse horse = (Horse) entity;
horse.setJumpStrength(this.horse.jump); horse.setJumpStrength(this.horse.jump);
horse.setCarryingChest(this.horse.chest); horse.setCarryingChest(this.horse.chest);
horse.setVariant(Variant.values()[this.horse.variant]); horse.setVariant(this.horse.variant);
horse.setStyle(Style.values()[this.horse.style]); horse.setStyle(this.horse.style);
horse.setColor(Color.values()[this.horse.color]); horse.setColor(this.horse.color);
restoreTameable(horse); restoreTameable(horse);
restoreAgeable(horse); restoreAgeable(horse);
restoreLiving(horse); restoreLiving(horse);

View File

@ -1,9 +1,12 @@
package com.plotsquared.bukkit.object.entity; package com.plotsquared.bukkit.object.entity;
public class HorseStats { import org.bukkit.entity.Horse;
public double jump;
public boolean chest; class HorseStats {
public int variant;
public int color; double jump;
public int style; boolean chest;
Horse.Variant variant;
Horse.Color color;
Horse.Style style;
} }

View File

@ -5,23 +5,24 @@ import org.bukkit.potion.PotionEffect;
import java.util.Collection; import java.util.Collection;
public class LivingEntityStats { class LivingEntityStats {
public boolean loot;
public String name; boolean loot;
public boolean visible; String name;
public float health; boolean visible;
public short air; float health;
public boolean persistent; short air;
public boolean leashed; boolean persistent;
public short leash_x; boolean leashed;
public short leash_y; short leash_x;
public short leash_z; short leash_y;
public boolean equipped; short leash_z;
public ItemStack mainHand; boolean equipped;
public ItemStack helmet; ItemStack mainHand;
public ItemStack boots; ItemStack helmet;
public ItemStack leggings; ItemStack boots;
public ItemStack chestplate; ItemStack leggings;
public Collection<PotionEffect> potions; ItemStack chestplate;
public ItemStack offHand; Collection<PotionEffect> potions;
ItemStack offHand;
} }

View File

@ -2,7 +2,8 @@ package com.plotsquared.bukkit.object.entity;
import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.AnimalTamer;
public class TameableStats { class TameableStats {
public AnimalTamer owner;
public boolean tamed; AnimalTamer owner;
boolean tamed;
} }