当前位置: 首页>>代码示例>>Java>>正文


Java MerchantRecipe.func_82784_g方法代码示例

本文整理汇总了Java中net.minecraft.village.MerchantRecipe.func_82784_g方法的典型用法代码示例。如果您正苦于以下问题:Java MerchantRecipe.func_82784_g方法的具体用法?Java MerchantRecipe.func_82784_g怎么用?Java MerchantRecipe.func_82784_g使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.village.MerchantRecipe的用法示例。


在下文中一共展示了MerchantRecipe.func_82784_g方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_74185_a

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
protected void func_74185_a(float p_74185_1_, int p_74185_2_, int p_74185_3_) {
   GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
   this.field_73882_e.func_110434_K().func_110577_a(field_110418_t);
   int var4 = (this.field_73880_f - this.field_74194_b) / 2;
   int var5 = (this.field_73881_g - this.field_74195_c) / 2;
   this.func_73729_b(var4, var5, 0, 0, this.field_74194_b, this.field_74195_c);
   MerchantRecipeList var6 = this.field_74203_o.func_70934_b(this.field_73882_e.field_71439_g);
   if(var6 != null && !var6.isEmpty()) {
      int var7 = this.field_74200_r;
      MerchantRecipe var8 = (MerchantRecipe)var6.get(var7);
      if(var8.func_82784_g()) {
         this.field_73882_e.func_110434_K().func_110577_a(field_110418_t);
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
         GL11.glDisable(2896);
         this.func_73729_b(this.field_74198_m + 83, this.field_74197_n + 21, 212, 0, 28, 21);
         this.func_73729_b(this.field_74198_m + 83, this.field_74197_n + 51, 212, 0, 28, 21);
      }
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:21,代码来源:GuiMerchant.java

示例2: drawGuiContainerBackgroundLayer

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
/**
 * Draw the background layer for the GuiContainer (everything behind the items)
 */
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(merchantGuiTextures);
    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
    MerchantRecipeList merchantrecipelist = this.theIMerchant.getRecipes(this.mc.thePlayer);

    if (merchantrecipelist != null && !merchantrecipelist.isEmpty())
    {
        int i1 = this.currentRecipeIndex;
        MerchantRecipe merchantrecipe = (MerchantRecipe)merchantrecipelist.get(i1);

        if (merchantrecipe.func_82784_g())
        {
            this.mc.getTextureManager().bindTexture(merchantGuiTextures);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glDisable(GL11.GL_LIGHTING);
            this.drawTexturedModalRect(this.guiLeft + 83, this.guiTop + 21, 212, 0, 28, 21);
            this.drawTexturedModalRect(this.guiLeft + 83, this.guiTop + 51, 212, 0, 28, 21);
        }
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:28,代码来源:GuiMerchant.java

示例3: func_70470_g

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void func_70470_g() {
   this.field_70472_d = null;
   ItemStack var1 = this.field_70474_b[0];
   ItemStack var2 = this.field_70474_b[1];
   if(var1 == null) {
      var1 = var2;
      var2 = null;
   }

   if(var1 == null) {
      this.func_70299_a(2, (ItemStack)null);
   } else {
      MerchantRecipeList var3 = this.field_70476_a.func_70934_b(this.field_70475_c);
      if(var3 != null) {
         MerchantRecipe var4 = var3.func_77203_a(var1, var2, this.field_70473_e);
         if(var4 != null && !var4.func_82784_g()) {
            this.field_70472_d = var4;
            this.func_70299_a(2, var4.func_77397_d().func_77946_l());
         } else if(var2 != null) {
            var4 = var3.func_77203_a(var2, var1, this.field_70473_e);
            if(var4 != null && !var4.func_82784_g()) {
               this.field_70472_d = var4;
               this.func_70299_a(2, var4.func_77397_d().func_77946_l());
            } else {
               this.func_70299_a(2, (ItemStack)null);
            }
         } else {
            this.func_70299_a(2, (ItemStack)null);
         }
      }
   }

   this.field_70476_a.func_110297_a_(this.func_70301_a(2));
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:35,代码来源:InventoryMerchant.java

示例4: updateAITick

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
/**
 * main AI tick function, replaces updateEntityActionState
 */
protected void updateAITick()
{
    if (--this.randomTickDivider <= 0)
    {
        this.worldObj.villageCollectionObj.addVillagerPosition(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
        this.randomTickDivider = 70 + this.rand.nextInt(50);
        this.villageObj = this.worldObj.villageCollectionObj.findNearestVillage(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 32);

        if (this.villageObj == null)
        {
            this.detachHome();
        }
        else
        {
            ChunkCoordinates chunkcoordinates = this.villageObj.getCenter();
            this.setHomeArea(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, (int)((float)this.villageObj.getVillageRadius() * 0.6F));

            if (this.field_82190_bM)
            {
                this.field_82190_bM = false;
                this.villageObj.func_82683_b(5);
            }
        }
    }

    if (!this.isTrading() && this.timeUntilReset > 0)
    {
        --this.timeUntilReset;

        if (this.timeUntilReset <= 0)
        {
            if (this.needsInitilization)
            {
                if (this.buyingList.size() > 1)
                {
                    Iterator iterator = this.buyingList.iterator();

                    while (iterator.hasNext())
                    {
                        MerchantRecipe merchantrecipe = (MerchantRecipe)iterator.next();

                        if (merchantrecipe.func_82784_g())
                        {
                            merchantrecipe.func_82783_a(this.rand.nextInt(6) + this.rand.nextInt(6) + 2);
                        }
                    }
                }

                this.addDefaultEquipmentAndRecipies(1);
                this.needsInitilization = false;

                if (this.villageObj != null && this.lastBuyingPlayer != null)
                {
                    this.worldObj.setEntityState(this, (byte)14);
                    this.villageObj.setReputationForPlayer(this.lastBuyingPlayer, 1);
                }
            }

            this.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0));
        }
    }

    super.updateAITick();
}
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.6.4,代码行数:68,代码来源:EntityGreenVillager.java

示例5: func_70629_bd

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
protected void func_70629_bd() {
   if(--this.field_70955_e <= 0) {
      this.field_70170_p.field_72982_D.func_75551_a(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70163_u), MathHelper.func_76128_c(this.field_70161_v));
      this.field_70955_e = 70 + this.field_70146_Z.nextInt(50);
      this.field_70954_d = this.field_70170_p.field_72982_D.func_75550_a(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70163_u), MathHelper.func_76128_c(this.field_70161_v), 32);
      if(this.field_70954_d == null) {
         this.func_110177_bN();
      } else {
         ChunkCoordinates var1 = this.field_70954_d.func_75577_a();
         this.func_110171_b(var1.field_71574_a, var1.field_71572_b, var1.field_71573_c, (int)((float)this.field_70954_d.func_75568_b() * 0.6F));
         if(this.field_82190_bM) {
            this.field_82190_bM = false;
            this.field_70954_d.func_82683_b(5);
         }
      }
   }

   if(!this.func_70940_q() && this.field_70961_j > 0) {
      --this.field_70961_j;
      if(this.field_70961_j <= 0) {
         if(this.field_70959_by) {
            if(this.field_70963_i.size() > 1) {
               Iterator var3 = this.field_70963_i.iterator();

               while(var3.hasNext()) {
                  MerchantRecipe var2 = (MerchantRecipe)var3.next();
                  if(var2.func_82784_g()) {
                     var2.func_82783_a(this.field_70146_Z.nextInt(6) + this.field_70146_Z.nextInt(6) + 2);
                  }
               }
            }

            this.func_70950_c(1);
            this.field_70959_by = false;
            if(this.field_70954_d != null && this.field_82189_bL != null) {
               this.field_70170_p.func_72960_a(this, (byte)14);
               this.field_70954_d.func_82688_a(this.field_82189_bL, 1);
            }
         }

         this.func_70690_d(new PotionEffect(Potion.field_76428_l.field_76415_H, 200, 0));
      }
   }

   super.func_70629_bd();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:47,代码来源:EntityVillager.java

示例6: resetRecipeAndSlots

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void resetRecipeAndSlots()
{
    this.currentRecipe = null;
    ItemStack itemstack = this.theInventory[0];
    ItemStack itemstack1 = this.theInventory[1];

    if (itemstack == null)
    {
        itemstack = itemstack1;
        itemstack1 = null;
    }

    if (itemstack == null)
    {
        this.setInventorySlotContents(2, (ItemStack)null);
    }
    else
    {
        MerchantRecipeList merchantrecipelist = this.theMerchant.getRecipes(this.thePlayer);

        if (merchantrecipelist != null)
        {
            MerchantRecipe merchantrecipe = merchantrecipelist.canRecipeBeUsed(itemstack, itemstack1, this.currentRecipeIndex);

            if (merchantrecipe != null && !merchantrecipe.func_82784_g())
            {
                this.currentRecipe = merchantrecipe;
                this.setInventorySlotContents(2, merchantrecipe.getItemToSell().copy());
            }
            else if (itemstack1 != null)
            {
                merchantrecipe = merchantrecipelist.canRecipeBeUsed(itemstack1, itemstack, this.currentRecipeIndex);

                if (merchantrecipe != null && !merchantrecipe.func_82784_g())
                {
                    this.currentRecipe = merchantrecipe;
                    this.setInventorySlotContents(2, merchantrecipe.getItemToSell().copy());
                }
                else
                {
                    this.setInventorySlotContents(2, (ItemStack)null);
                }
            }
            else
            {
                this.setInventorySlotContents(2, (ItemStack)null);
            }
        }
    }

    this.theMerchant.func_110297_a_(this.getStackInSlot(2));
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:53,代码来源:InventoryMerchant.java


注:本文中的net.minecraft.village.MerchantRecipe.func_82784_g方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。