本文整理汇总了Java中net.minecraft.village.MerchantRecipe.func_77396_b方法的典型用法代码示例。如果您正苦于以下问题:Java MerchantRecipe.func_77396_b方法的具体用法?Java MerchantRecipe.func_77396_b怎么用?Java MerchantRecipe.func_77396_b使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.village.MerchantRecipe
的用法示例。
在下文中一共展示了MerchantRecipe.func_77396_b方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_77200_a
import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void func_77200_a(DataOutputStream p_77200_1_) throws IOException {
p_77200_1_.writeByte((byte)(this.size() & 255));
for(int var2 = 0; var2 < this.size(); ++var2) {
MerchantRecipe var3 = (MerchantRecipe)this.get(var2);
Packet.func_73270_a(var3.func_77394_a(), p_77200_1_);
Packet.func_73270_a(var3.func_77397_d(), p_77200_1_);
ItemStack var4 = var3.func_77396_b();
p_77200_1_.writeBoolean(var4 != null);
if(var4 != null) {
Packet.func_73270_a(var4, p_77200_1_);
}
p_77200_1_.writeBoolean(var3.func_82784_g());
}
}
示例2: func_75230_a
import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
private boolean func_75230_a(MerchantRecipe p_75230_1_, ItemStack p_75230_2_, ItemStack p_75230_3_) {
ItemStack var4 = p_75230_1_.func_77394_a();
ItemStack var5 = p_75230_1_.func_77396_b();
if(p_75230_2_ != null && p_75230_2_.field_77993_c == var4.field_77993_c) {
if(var5 != null && p_75230_3_ != null && var5.field_77993_c == p_75230_3_.field_77993_c) {
p_75230_2_.field_77994_a -= var4.field_77994_a;
p_75230_3_.field_77994_a -= var5.field_77994_a;
return true;
}
if(var5 == null && p_75230_3_ == null) {
p_75230_2_.field_77994_a -= var4.field_77994_a;
return true;
}
}
return false;
}
示例3: func_77203_a
import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public MerchantRecipe func_77203_a(ItemStack p_77203_1_, ItemStack p_77203_2_, int p_77203_3_) {
if(p_77203_3_ > 0 && p_77203_3_ < this.size()) {
MerchantRecipe var6 = (MerchantRecipe)this.get(p_77203_3_);
return p_77203_1_.field_77993_c == var6.func_77394_a().field_77993_c && (p_77203_2_ == null && !var6.func_77398_c() || var6.func_77398_c() && p_77203_2_ != null && var6.func_77396_b().field_77993_c == p_77203_2_.field_77993_c) && p_77203_1_.field_77994_a >= var6.func_77394_a().field_77994_a && (!var6.func_77398_c() || p_77203_2_.field_77994_a >= var6.func_77396_b().field_77994_a)?var6:null;
} else {
for(int var4 = 0; var4 < this.size(); ++var4) {
MerchantRecipe var5 = (MerchantRecipe)this.get(var4);
if(p_77203_1_.field_77993_c == var5.func_77394_a().field_77993_c && p_77203_1_.field_77994_a >= var5.func_77394_a().field_77994_a && (!var5.func_77398_c() && p_77203_2_ == null || var5.func_77398_c() && p_77203_2_ != null && var5.func_77396_b().field_77993_c == p_77203_2_.field_77993_c && p_77203_2_.field_77994_a >= var5.func_77396_b().field_77994_a)) {
return var5;
}
}
return null;
}
}
示例4: func_73863_a
import net.minecraft.village.MerchantRecipe; //导入方法依赖的package包/类
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
MerchantRecipeList var4 = this.field_74203_o.func_70934_b(this.field_73882_e.field_71439_g);
if(var4 != null && !var4.isEmpty()) {
int var5 = (this.field_73880_f - this.field_74194_b) / 2;
int var6 = (this.field_73881_g - this.field_74195_c) / 2;
int var7 = this.field_74200_r;
MerchantRecipe var8 = (MerchantRecipe)var4.get(var7);
GL11.glPushMatrix();
ItemStack var9 = var8.func_77394_a();
ItemStack var10 = var8.func_77396_b();
ItemStack var11 = var8.func_77397_d();
RenderHelper.func_74520_c();
GL11.glDisable(2896);
GL11.glEnable('\u803a');
GL11.glEnable(2903);
GL11.glEnable(2896);
field_74196_a.field_77023_b = 100.0F;
field_74196_a.func_82406_b(this.field_73886_k, this.field_73882_e.func_110434_K(), var9, var5 + 36, var6 + 24);
field_74196_a.func_77021_b(this.field_73886_k, this.field_73882_e.func_110434_K(), var9, var5 + 36, var6 + 24);
if(var10 != null) {
field_74196_a.func_82406_b(this.field_73886_k, this.field_73882_e.func_110434_K(), var10, var5 + 62, var6 + 24);
field_74196_a.func_77021_b(this.field_73886_k, this.field_73882_e.func_110434_K(), var10, var5 + 62, var6 + 24);
}
field_74196_a.func_82406_b(this.field_73886_k, this.field_73882_e.func_110434_K(), var11, var5 + 120, var6 + 24);
field_74196_a.func_77021_b(this.field_73886_k, this.field_73882_e.func_110434_K(), var11, var5 + 120, var6 + 24);
field_74196_a.field_77023_b = 0.0F;
GL11.glDisable(2896);
if(this.func_74188_c(36, 24, 16, 16, p_73863_1_, p_73863_2_)) {
this.func_74184_a(var9, p_73863_1_, p_73863_2_);
} else if(var10 != null && this.func_74188_c(62, 24, 16, 16, p_73863_1_, p_73863_2_)) {
this.func_74184_a(var10, p_73863_1_, p_73863_2_);
} else if(this.func_74188_c(120, 24, 16, 16, p_73863_1_, p_73863_2_)) {
this.func_74184_a(var11, p_73863_1_, p_73863_2_);
}
GL11.glPopMatrix();
GL11.glEnable(2896);
GL11.glEnable(2929);
RenderHelper.func_74519_b();
}
}