本文整理汇总了Java中net.minecraft.entity.passive.EntityHorse.isChested方法的典型用法代码示例。如果您正苦于以下问题:Java EntityHorse.isChested方法的具体用法?Java EntityHorse.isChested怎么用?Java EntityHorse.isChested使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.passive.EntityHorse
的用法示例。
在下文中一共展示了EntityHorse.isChested方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMeta
import net.minecraft.entity.passive.EntityHorse; //导入方法依赖的package包/类
@Override
public Object getMeta(EntityHorse target, Vec3 relativePos) {
Map<String, Object> map = Maps.newHashMap();
map.put("eatingHaystack", target.isEatingHaystack());
map.put("hasReproduced", target.getHasReproduced());
map.put("bred", target.func_110205_ce());
map.put("horseType", target.getHorseType());
map.put("horseVariant", target.getHorseVariant());
map.put("horseTemper", target.getTemper());
map.put("horseTame", target.isTame());
map.put("ownerUUID", target.func_152119_ch());
final boolean chested = target.isChested();
map.put("chestedHorse", chested);
if (chested) {
IInventory invent = HORSE_CHEST.get(target);
map.put("chest", InventoryMetaProvider.wrapToProxyTable(invent));
}
return map;
}
示例2: ContainerHorseInventory
import net.minecraft.entity.passive.EntityHorse; //导入方法依赖的package包/类
public ContainerHorseInventory(IInventory par1IInventory, IInventory par2IInventory, EntityHorse par3EntityHorse)
{
this.field_111243_a = par2IInventory;
this.theHorse = par3EntityHorse;
byte b0 = 3;
par2IInventory.openChest();
int i = (b0 - 4) * 18;
this.addSlotToContainer(new ContainerHorseInventorySlotSaddle(this, par2IInventory, 0, 8, 18));
this.addSlotToContainer(new ContainerHorseInventorySlotArmor(this, par2IInventory, 1, 8, 36, par3EntityHorse));
int j;
int k;
if (par3EntityHorse.isChested())
{
for (j = 0; j < b0; ++j)
{
for (k = 0; k < 5; ++k)
{
this.addSlotToContainer(new Slot(par2IInventory, 2 + k + j * 5, 80 + k * 18, 18 + j * 18));
}
}
}
for (j = 0; j < 3; ++j)
{
for (k = 0; k < 9; ++k)
{
this.addSlotToContainer(new Slot(par1IInventory, k + j * 9 + 9, 8 + k * 18, 102 + j * 18 + i));
}
}
for (j = 0; j < 9; ++j)
{
this.addSlotToContainer(new Slot(par1IInventory, j, 8 + j * 18, 160 + i));
}
}