@Override public boolean isValid() { if (damageMode != DamageMode.DISABLED) { return true; } for (ItemStack item : items) { if (item != null && Prep.isValid(item)) { return true; } } return false; }
@Override public String toString() { return "CapturedMob [" + "entityId=" + entityId + ", " + (customName != null ? "customName=" + customName + ", " : "") + (entityNbt != null ? "entityNbt=" + entityNbt + ", " : "") + "getDisplayName()=" + getDisplayName() + ", getHealth()=" + getHealth() + ", getMaxHealth()=" + getMaxHealth() + ", " + (getColor() != null ? "getColor()=" + getColor() + ", " : "") + (getFluidName() != null ? "getFluidName()=" + getFluidName() : "") + "]"; }
@Override public void clear() { for (int i = 0; i < items.length; i++) { removeStackFromSlot(i); } }
@Override public @Nonnull ItemStack removeStackFromSlot(int index) { ItemStack stack = getStackInSlot(index); setInventorySlotContents(index, Prep.getEmpty()); return stack; }
public MachineRecipeInput(int slotNumber, FluidStack fluid) { this.slotNumber = slotNumber; item = Prep.getEmpty(); this.fluid = fluid; }
public ResourceLocation getEntityName() { return capturedMob != null ? capturedMob.getEntityName() : null; }
protected void readSettingsFromNBT(NBTTagCompound nbtRoot) { blacklist = NbtValue.FILTER_BLACKLIST.getBoolean(nbtRoot); matchMeta = NbtValue.FILTER_META.getBoolean(nbtRoot); matchNBT = NbtValue.FILTER_NBT.getBoolean(nbtRoot); useOreDict = NbtValue.FILTER_OREDICT.getBoolean(nbtRoot); sticky = NbtValue.FILTER_STICKY.getBoolean(nbtRoot); }
protected void writeSettingToNBT(NBTTagCompound nbtRoot) { NbtValue.FILTER_BLACKLIST.setBoolean(nbtRoot, blacklist); NbtValue.FILTER_META.setBoolean(nbtRoot, matchMeta); NbtValue.FILTER_NBT.setBoolean(nbtRoot, matchNBT); NbtValue.FILTER_OREDICT.setBoolean(nbtRoot, useOreDict); NbtValue.FILTER_STICKY.setBoolean(nbtRoot, sticky); }
@Override public IMessage onMessage(PacketSpawnParticles message, MessageContext ctx) { for (Data data : message.data) { for (EnumParticleTypes particle : data.particles) { if (particle != null) { ClientUtil.spawnParcticles(data.posX, data.posY, data.posZ, data.count, particle); } } } return null; } }
public static boolean compareNbt(NBTTagCompound oldNbt, NBTTagCompound newNbt) { return energyInvarientNbtComparer.compare(oldNbt, newNbt); }
public static int getRGBA(float r, float g, float b, float a) { return getRGBA((int) (r * 255), (int) (g * 255), (int) (b * 255), (int) (a * 255)); }
public static int getRGB(float r, float g, float b) { return getRGB((int) (r * 255), (int) (g * 255), (int) (b * 255)); }
public static int getARGB(float r, float g, float b, float a) { return getARGB((int) (a * 255), (int) (r * 255), (int) (g * 255), (int) (b * 255)); }
protected boolean hasStuffToPush() { for (int slot = slotDefinition.minOutputSlot; slot <= slotDefinition.maxOutputSlot; slot++) { final ItemStack itemStack = inventory[slot]; if (itemStack != null && Prep.isValid(itemStack)) { return true; } } return false; }
public TheOneProbeUpgrade() { super(UPGRADE_NAME, "enderio.darksteel.upgrade.top", Prep.getEmpty(), DarkSteelConfig.topCost); }
public boolean isAvailable() { return probe != null && Prep.isValid(probe); }
public RecipeInput(FluidStack fluidStack, float mulitplier) { this(Prep.getEmpty(), true, fluidStack, mulitplier, -1); }