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


Java MerchantRecipe.hasSameIDsAs方法代码示例

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


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

示例1: useRecipe

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void useRecipe(MerchantRecipe par1MerchantRecipe)
{
    par1MerchantRecipe.incrementToolUses();
    this.livingSoundTime = -this.getTalkInterval();
    this.playSound("mob.villager.yes", this.getSoundVolume(), this.getSoundPitch());

    if (par1MerchantRecipe.hasSameIDsAs((MerchantRecipe)this.buyingList.get(this.buyingList.size() - 1)))
    {
        this.timeUntilReset = 40;
        this.needsInitilization = true;

        if (this.buyingPlayer != null)
        {
            this.lastBuyingPlayer = this.buyingPlayer.getCommandSenderName();
        }
        else
        {
            this.lastBuyingPlayer = null;
        }
    }

    if (par1MerchantRecipe.getItemToBuy().getItem() == Items.emerald)
    {
        this.wealth += par1MerchantRecipe.getItemToBuy().stackSize;
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:27,代码来源:EntityVillager.java

示例2: useRecipe

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void useRecipe(MerchantRecipe p_70933_1_)
{
    p_70933_1_.incrementToolUses();
    this.livingSoundTime = -this.getTalkInterval();
    this.playSound("mob.villager.yes", this.getSoundVolume(), this.getSoundPitch());

    if (p_70933_1_.hasSameIDsAs((MerchantRecipe)this.buyingList.get(this.buyingList.size() - 1)))
    {
        this.timeUntilReset = 40;
        this.needsInitilization = true;

        if (this.buyingPlayer != null)
        {
            this.lastBuyingPlayer = this.buyingPlayer.getCommandSenderName();
        }
        else
        {
            this.lastBuyingPlayer = null;
        }
    }

    if (p_70933_1_.getItemToBuy().getItem() == Items.emerald)
    {
        this.wealth += p_70933_1_.getItemToBuy().stackSize;
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:27,代码来源:EntityVillager.java

示例3: useRecipe

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void useRecipe(MerchantRecipe par1MerchantRecipe)
{
    par1MerchantRecipe.incrementToolUses();

    if (par1MerchantRecipe.hasSameIDsAs((MerchantRecipe)this.buyingList.get(this.buyingList.size() - 1)))
    {
        this.timeUntilReset = 40;
        this.needsInitilization = true;

        if (this.buyingPlayer != null)
        {
            this.lastBuyingPlayer = this.buyingPlayer.getCommandSenderName();
        }
        else
        {
            this.lastBuyingPlayer = null;
        }
    }

    if (par1MerchantRecipe.getItemToBuy().itemID == Item.emerald.itemID)
    {
        this.wealth += par1MerchantRecipe.getItemToBuy().stackSize;
    }
}
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.6.4,代码行数:25,代码来源:EntityGreenVillager.java

示例4: useRecipe

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void useRecipe(MerchantRecipe par1MerchantRecipe)
{
    par1MerchantRecipe.incrementToolUses();

    if (par1MerchantRecipe.hasSameIDsAs((MerchantRecipe)this.buyingList.get(this.buyingList.size() - 1)))
    {
        this.timeUntilReset = 40;
        this.needsInitilization = true;

        if (this.buyingPlayer != null)
        {
            this.lastBuyingPlayer = this.buyingPlayer.getCommandSenderName();
        }
        else
        {
            this.lastBuyingPlayer = null;
        }
    }

    if (par1MerchantRecipe.getItemToBuy().itemID == mod_Rediscovered.gemRuby.itemID)
    {
        this.wealth += par1MerchantRecipe.getItemToBuy().stackSize;
    }
}
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.6.4,代码行数:25,代码来源:EntityPigman.java

示例5: useRecipe

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void useRecipe(MerchantRecipe par1MerchantRecipe)
{
    par1MerchantRecipe.incrementToolUses();
    this.livingSoundTime = -this.getTalkInterval();
    this.playSound("mob.villager.yes", this.getSoundVolume(), this.getSoundPitch());

    if (par1MerchantRecipe.hasSameIDsAs((MerchantRecipe)this.buyingList.get(this.buyingList.size() - 1)))
    {
        this.timeUntilReset = 40;
        this.needsInitilization = true;

        if (this.buyingPlayer != null)
        {
            this.lastBuyingPlayer = this.buyingPlayer.getCommandSenderName();
        }
        else
        {
            this.lastBuyingPlayer = null;
        }
    }

    if (par1MerchantRecipe.getItemToBuy().itemID == Item.emerald.itemID)
    {
        this.wealth += par1MerchantRecipe.getItemToBuy().stackSize;
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:27,代码来源:EntityVillager.java

示例6: useRecipe

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void useRecipe(MerchantRecipe par1MerchantRecipe)
{
    par1MerchantRecipe.incrementToolUses();
    this.livingSoundTime = -this.getTalkInterval();
    this.playSound("mob.pig.say", this.getSoundVolume(), this.getSoundPitch());

    if (par1MerchantRecipe.hasSameIDsAs((MerchantRecipe)this.buyingList.get(this.buyingList.size() - 1)))
    {
        this.timeUntilReset = 40;
        this.needsInitilization = true;

        if (this.buyingPlayer != null)
        {
            this.lastBuyingPlayer = this.buyingPlayer.getCommandSenderName();
        }
        else
        {
            this.lastBuyingPlayer = null;
        }
    }

    if (par1MerchantRecipe.getItemToBuy().getItem() == mod_Rediscovered.gemRuby)
    {
        this.wealth += par1MerchantRecipe.getItemToBuy().stackSize;
    }
}
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.7.10,代码行数:27,代码来源:EntityPigman.java

示例7: useRecipe

import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
@Override
public void useRecipe(MerchantRecipe p_70933_1_)
   {
       p_70933_1_.incrementToolUses();
       this.livingSoundTime = -this.getTalkInterval();
       this.playSound("mob.villager.yes", this.getSoundVolume(), this.getSoundPitch());

       if (p_70933_1_.hasSameIDsAs((MerchantRecipe)this.buyingList.get(this.buyingList.size() - 1)))
       {
           this.timeUntilReset = 40;
           this.needsInitilization = true;

           if (this.buyingPlayer != null)
           {
               this.lastBuyingPlayer = this.buyingPlayer.getCommandSenderName();
           }
           else
           {
               this.lastBuyingPlayer = null;
           }
       }

       if (p_70933_1_.getItemToBuy().getItem() == Items.emerald)
       {
           this.wealth += p_70933_1_.getItemToBuy().stackSize;
       }
   }
 
开发者ID:MagiciansArtificeTeam,项目名称:Magicians-Artifice,代码行数:28,代码来源:EntityMagician.java


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