public static float getFloat(ItemStack stack, String tag, float defaultExpected) { return verifyExistance(stack, tag) ? getNBT(stack).getFloat(tag) : defaultExpected; }
@Override public void readPacketNBT(NBTTagCompound par1nbtTagCompound) { super.readPacketNBT(par1nbtTagCompound); time = par1nbtTagCompound.getInteger(TAG_TIME); timeFraction = par1nbtTagCompound.getFloat(TAG_TIME_FRACTION); flip = par1nbtTagCompound.getBoolean(TAG_FLIP); flipTicks = par1nbtTagCompound.getInteger(TAG_FLIP_TICKS); move = par1nbtTagCompound.getBoolean(TAG_MOVE); lock = par1nbtTagCompound.getBoolean(TAG_LOCK); }
@Override public void readEntityFromNBT(@Nonnull NBTTagCompound cmp) { super.readEntityFromNBT(cmp); setCharging(cmp.getBoolean(TAG_CHARGING)); setVariety(cmp.getInteger(TAG_VARIETY)); setChargeTicks(cmp.getInteger(TAG_CHARGE_TICKS)); setLiveTicks(cmp.getInteger(TAG_LIVE_TICKS)); setDelay(cmp.getInteger(TAG_DELAY)); setRotation(cmp.getFloat(TAG_ROTATION)); }
rotationX = cmp.getFloat(TAG_ROTATION_X); rotationY = cmp.getFloat(TAG_ROTATION_Y); requestsClientUpdate = cmp.getBoolean(TAG_REQUEST_UPDATE); mmForcedManaPayload = cmp.getInteger(TAG_FORCED_MANA_PAYLOAD); mmForcedTicksBeforeManaLoss = cmp.getInteger(TAG_FORCED_TICKS_BEFORE_MANA_LOSS); mmForcedManaLossPerTick = cmp.getFloat(TAG_FORCED_MANA_LOSS_PER_TICK); mmForcedGravity = cmp.getFloat(TAG_FORCED_GRAVITY); mmForcedVelocityMultiplier = cmp.getFloat(TAG_FORCED_VELOCITY_MULTIPLIER);
@Override public void deserializeNBT(NBTTagCompound tag) { this.crankAngle = tag.getFloat("cA"); this.crankSpeed = tag.getFloat("cS"); this.bowAngle = tag.getFloat("bA"); this.bowSpeed = tag.getFloat("bS"); this.stringAngle = tag.getFloat("sA"); this.stringSpeed = tag.getFloat("sS"); this.triggerAngle = tag.getFloat("tA"); }
public static float getCapLevelRaw(@Nonnull ItemStack stack) { NBTTagCompound tag = stack.getSubCompound("eiocap"); if (tag == null) { return 1; } return tag.getFloat("level"); }
@Override public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); tension = nbttagcompound.getFloat("Wound"); }
@Override public void parseRule(NBTTagCompound tag) { super.parseRule(tag); turretRotation = tag.getFloat("turretRotation"); } }
final float chance = msg.getFloat( "chance" ); final IGrinderRegistry grinderRegistry = AEApi.instance().registries().grinder(); final IGrinderRecipeBuilder builder = grinderRegistry.builder();
@Override public @Nonnull FluidTank readFromNBT(NBTTagCompound nbtRoot) { experienceLevel = nbtRoot.getInteger("experienceLevel"); experienceTotal = nbtRoot.getInteger("experienceTotal"); experience = nbtRoot.getFloat("experience"); return this; }
public float getHealth() { if (entityNbt != null && entityNbt.hasKey("HealF")) { return NullHelper.notnullJ(entityNbt, "private final field changed its value").getFloat("HealF"); } else { return Float.NaN; } }
public float getMaxHealth() { NBTTagCompound maxHealthAttrib = getAttribute("generic.maxHealth"); if (maxHealthAttrib != null && maxHealthAttrib.hasKey("Base")) { return maxHealthAttrib.getFloat("Base"); } return Float.NaN; }
@Override public void readFromNBT(NBTTagCompound nbt, String str) { tank.readFromNBT(nbt.getCompoundTag(str + "tank")); fluid_heat_mb = nbt.getFloat(str + "fhm"); }
public void addCoolant(NBTTagCompound tag) { if (tag == null) { return; } if (!tag.hasKey(KEY_FLUID_NAME)) { return; } if (!tag.hasKey(KEY_COOLING_PER_MB)) { return; } addCoolant(tag.getString(KEY_FLUID_NAME), tag.getFloat(KEY_COOLING_PER_MB)); }
@Override public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); IAllele stored = AlleleManager.alleleRegistry.getAllele(nbttagcompound.getString("UID")); if (stored instanceof IAlleleFruit) { allele = (IAlleleFruit) stored; } else { allele = defaultAllele; } maturity = nbttagcompound.getShort("MT"); yield = nbttagcompound.getFloat("SP"); }
@Override public void readEntityFromNBT(@Nonnull NBTTagCompound root) { super.readEntityFromNBT(root); if (root.hasKey("scale")) { setScale(root.getFloat("scale")); } if (root.hasKey("growthMode")) { setGrowthMode(root.getByte("growthMode")); } }
@Override public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); charge = nbttagcompound.getInteger("Charge"); progress = nbttagcompound.getFloat("Progress"); stage = nbttagcompound.getInteger("Stage"); duration = nbttagcompound.getInteger("Duration"); reverse = nbttagcompound.getBoolean("Reverse"); }
@Override public void readEntityFromNBT(NBTTagCompound compound) { if(compound.hasKey(TAG_ITEMDROPCHANCE, 99)) { itemDropChance = compound.getFloat(TAG_ITEMDROPCHANCE); } super.readEntityFromNBT(compound); this.updateFacingWithBoundingBox(EnumFacing.getFront(compound.getByte(TAG_REALFACINGDIRECTION))); }