Java 类net.minecraft.util.EnumArt 实例源码

项目:RuneCraftery    文件:EntityPainting.java   
public EntityPainting(World p_i1600_1_, int p_i1600_2_, int p_i1600_3_, int p_i1600_4_, int p_i1600_5_) {
   super(p_i1600_1_, p_i1600_2_, p_i1600_3_, p_i1600_4_, p_i1600_5_);
   ArrayList var6 = new ArrayList();
   EnumArt[] var7 = EnumArt.values();
   int var8 = var7.length;

   for(int var9 = 0; var9 < var8; ++var9) {
      EnumArt var10 = var7[var9];
      this.field_70522_e = var10;
      this.func_82328_a(p_i1600_5_);
      if(this.func_70518_d()) {
         var6.add(var10);
      }
   }

   if(!var6.isEmpty()) {
      this.field_70522_e = (EnumArt)var6.get(this.field_70146_Z.nextInt(var6.size()));
   }

   this.func_82328_a(p_i1600_5_);
}
项目:RuneCraftery    文件:EntityPainting.java   
@SideOnly(Side.CLIENT)
public EntityPainting(World p_i1601_1_, int p_i1601_2_, int p_i1601_3_, int p_i1601_4_, int p_i1601_5_, String p_i1601_6_) {
   this(p_i1601_1_, p_i1601_2_, p_i1601_3_, p_i1601_4_, p_i1601_5_);
   EnumArt[] var7 = EnumArt.values();
   int var8 = var7.length;

   for(int var9 = 0; var9 < var8; ++var9) {
      EnumArt var10 = var7[var9];
      if(var10.field_75702_A.equals(p_i1601_6_)) {
         this.field_70522_e = var10;
         break;
      }
   }

   this.func_82328_a(p_i1601_5_);
}
项目:RuneCraftery    文件:EntityPainting.java   
public void func_70037_a(NBTTagCompound p_70037_1_) {
   String var2 = p_70037_1_.func_74779_i("Motive");
   EnumArt[] var3 = EnumArt.values();
   int var4 = var3.length;

   for(int var5 = 0; var5 < var4; ++var5) {
      EnumArt var6 = var3[var5];
      if(var6.field_75702_A.equals(var2)) {
         this.field_70522_e = var6;
      }
   }

   if(this.field_70522_e == null) {
      this.field_70522_e = EnumArt.Kebab;
   }

   super.func_70037_a(p_70037_1_);
}
项目:RuneCraftery    文件:EntityPainting.java   
public EntityPainting(World par1World, int par2, int par3, int par4, int par5)
{
    super(par1World, par2, par3, par4, par5);
    ArrayList arraylist = new ArrayList();
    EnumArt[] aenumart = EnumArt.values();
    int i1 = aenumart.length;

    for (int j1 = 0; j1 < i1; ++j1)
    {
        EnumArt enumart = aenumart[j1];
        this.art = enumart;
        this.setDirection(par5);

        if (this.onValidSurface())
        {
            arraylist.add(enumart);
        }
    }

    if (!arraylist.isEmpty())
    {
        this.art = (EnumArt)arraylist.get(this.rand.nextInt(arraylist.size()));
    }

    this.setDirection(par5);
}
项目:RuneCraftery    文件:EntityPainting.java   
@SideOnly(Side.CLIENT)
public EntityPainting(World par1World, int par2, int par3, int par4, int par5, String par6Str)
{
    this(par1World, par2, par3, par4, par5);
    EnumArt[] aenumart = EnumArt.values();
    int i1 = aenumart.length;

    for (int j1 = 0; j1 < i1; ++j1)
    {
        EnumArt enumart = aenumart[j1];

        if (enumart.title.equals(par6Str))
        {
            this.art = enumart;
            break;
        }
    }

    this.setDirection(par5);
}
项目:RuneCraftery    文件:EntityPainting.java   
/**
 * (abstract) Protected helper method to read subclass entity data from NBT.
 */
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
    String s = par1NBTTagCompound.getString("Motive");
    EnumArt[] aenumart = EnumArt.values();
    int i = aenumart.length;

    for (int j = 0; j < i; ++j)
    {
        EnumArt enumart = aenumart[j];

        if (enumart.title.equals(s))
        {
            this.art = enumart;
        }
    }

    if (this.art == null)
    {
        this.art = EnumArt.Kebab;
    }

    super.readEntityFromNBT(par1NBTTagCompound);
}
项目:BetterNutritionMod    文件:EntityPainting.java   
public EntityPainting(World par1World, int par2, int par3, int par4, int par5)
{
    super(par1World, par2, par3, par4, par5);
    ArrayList arraylist = new ArrayList();
    EnumArt[] aenumart = EnumArt.values();
    int i1 = aenumart.length;

    for (int j1 = 0; j1 < i1; ++j1)
    {
        EnumArt enumart = aenumart[j1];
        this.art = enumart;
        this.setDirection(par5);

        if (this.onValidSurface())
        {
            arraylist.add(enumart);
        }
    }

    if (!arraylist.isEmpty())
    {
        this.art = (EnumArt)arraylist.get(this.rand.nextInt(arraylist.size()));
    }

    this.setDirection(par5);
}
项目:BetterNutritionMod    文件:EntityPainting.java   
@SideOnly(Side.CLIENT)
public EntityPainting(World par1World, int par2, int par3, int par4, int par5, String par6Str)
{
    this(par1World, par2, par3, par4, par5);
    EnumArt[] aenumart = EnumArt.values();
    int i1 = aenumart.length;

    for (int j1 = 0; j1 < i1; ++j1)
    {
        EnumArt enumart = aenumart[j1];

        if (enumart.title.equals(par6Str))
        {
            this.art = enumart;
            break;
        }
    }

    this.setDirection(par5);
}
项目:BetterNutritionMod    文件:EntityPainting.java   
/**
 * (abstract) Protected helper method to read subclass entity data from NBT.
 */
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
    String s = par1NBTTagCompound.getString("Motive");
    EnumArt[] aenumart = EnumArt.values();
    int i = aenumart.length;

    for (int j = 0; j < i; ++j)
    {
        EnumArt enumart = aenumart[j];

        if (enumart.title.equals(s))
        {
            this.art = enumart;
        }
    }

    if (this.art == null)
    {
        this.art = EnumArt.Kebab;
    }

    super.readEntityFromNBT(par1NBTTagCompound);
}
项目:RuneCraftery    文件:Packet25EntityPainting.java   
public void func_73267_a(DataInput p_73267_1_) throws IOException {
   this.field_73508_a = p_73267_1_.readInt();
   this.field_73503_f = func_73282_a(p_73267_1_, EnumArt.field_75728_z);
   this.field_73506_b = p_73267_1_.readInt();
   this.field_73507_c = p_73267_1_.readInt();
   this.field_73504_d = p_73267_1_.readInt();
   this.field_73505_e = p_73267_1_.readInt();
}
项目:RuneCraftery    文件:RenderPainting.java   
public void func_77009_a(EntityPainting p_77009_1_, double p_77009_2_, double p_77009_4_, double p_77009_6_, float p_77009_8_, float p_77009_9_) {
   GL11.glPushMatrix();
   GL11.glTranslatef((float)p_77009_2_, (float)p_77009_4_, (float)p_77009_6_);
   GL11.glRotatef(p_77009_8_, 0.0F, 1.0F, 0.0F);
   GL11.glEnable('\u803a');
   this.func_110777_b(p_77009_1_);
   EnumArt var10 = p_77009_1_.field_70522_e;
   float var11 = 0.0625F;
   GL11.glScalef(var11, var11, var11);
   this.func_77010_a(p_77009_1_, var10.field_75703_B, var10.field_75704_C, var10.field_75699_D, var10.field_75700_E);
   GL11.glDisable('\u803a');
   GL11.glPopMatrix();
}
项目:RuneCraftery    文件:Packet25EntityPainting.java   
/**
 * Abstract. Reads the raw packet data from the data stream.
 */
public void readPacketData(DataInput par1DataInput) throws IOException
{
    this.entityId = par1DataInput.readInt();
    this.title = readString(par1DataInput, EnumArt.maxArtTitleLength);
    this.xPosition = par1DataInput.readInt();
    this.yPosition = par1DataInput.readInt();
    this.zPosition = par1DataInput.readInt();
    this.direction = par1DataInput.readInt();
}
项目:RuneCraftery    文件:RenderPainting.java   
public void renderThePainting(EntityPainting par1EntityPainting, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glRotatef(par8, 0.0F, 1.0F, 0.0F);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    this.bindEntityTexture(par1EntityPainting);
    EnumArt enumart = par1EntityPainting.art;
    float f2 = 0.0625F;
    GL11.glScalef(f2, f2, f2);
    this.func_77010_a(par1EntityPainting, enumart.sizeX, enumart.sizeY, enumart.offsetX, enumart.offsetY);
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
项目:BetterNutritionMod    文件:Packet25EntityPainting.java   
/**
 * Abstract. Reads the raw packet data from the data stream.
 */
public void readPacketData(DataInput par1DataInput) throws IOException
{
    this.entityId = par1DataInput.readInt();
    this.title = readString(par1DataInput, EnumArt.maxArtTitleLength);
    this.xPosition = par1DataInput.readInt();
    this.yPosition = par1DataInput.readInt();
    this.zPosition = par1DataInput.readInt();
    this.direction = par1DataInput.readInt();
}
项目:BetterNutritionMod    文件:RenderPainting.java   
public void renderThePainting(EntityPainting par1EntityPainting, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glRotatef(par8, 0.0F, 1.0F, 0.0F);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    this.bindEntityTexture(par1EntityPainting);
    EnumArt enumart = par1EntityPainting.art;
    float f2 = 0.0625F;
    GL11.glScalef(f2, f2, f2);
    this.func_77010_a(par1EntityPainting, enumart.sizeX, enumart.sizeY, enumart.offsetX, enumart.offsetY);
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
项目:powell.cellarium    文件:VisionOfPowellGUI.java   
@Override
    protected void createGui() {
        scrollbar = new ScrollbarVanilla(10);
        visionContainer = new Container(scrollbar, 0, 4);
        container = new Container();
        title = new Label("Vision of Powell");
        back = new ButtonVanilla("Cancel", new CloseHandler());

        EnumArt[] enumArts = EnumArt.values();
        ArrayList<EnumArt> validArts = new ArrayList<EnumArt>();
//      for (String s : art)
//          for (EnumArt enumArt : enumArts)
//              if (enumArt.title.equals(s)){
//                  validArts.add(enumArt);
//                  break;
//              }

//      EnumArt[] validArtsArray = validArts.toArray(new EnumArt[0]);
//      buttons = new PaintingButton[validArtsArray.length];
//      for (int i = 0; i < validArtsArray.length; ++i)
//          buttons[i] = new PaintingButton(validArtsArray[i], this);

        container.addWidgets(title, back);
        //visionContainer.addWidgets(buttons);

        containers.add(visionContainer);
        containers.add(container);
        selectedContainer = visionContainer;
    }
项目:RuneCraftery    文件:EnumHelper.java   
public static EnumArt addArt(String name, String tile, int sizeX, int sizeY, int offsetX, int offsetY)
{
    return addEnum(EnumArt.class, name, tile, sizeX, sizeY, offsetX, offsetY);
}
项目:RuneCraftery    文件:EnumHelper.java   
public static EnumArt addArt(String name, String tile, int sizeX, int sizeY, int offsetX, int offsetY)
{
    return addEnum(EnumArt.class, name, tile, sizeX, sizeY, offsetX, offsetY);
}
项目:BetterNutritionMod    文件:EnumHelper.java   
public static EnumArt addArt(String name, String tile, int sizeX, int sizeY, int offsetX, int offsetY)
{
    return addEnum(EnumArt.class, name, tile, sizeX, sizeY, offsetX, offsetY);
}