本文整理汇总了Java中net.minecraft.inventory.Container.calcRedstoneFromInventory方法的典型用法代码示例。如果您正苦于以下问题:Java Container.calcRedstoneFromInventory方法的具体用法?Java Container.calcRedstoneFromInventory怎么用?Java Container.calcRedstoneFromInventory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.inventory.Container
的用法示例。
在下文中一共展示了Container.calcRedstoneFromInventory方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getComparatorInputOverride
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
public int getComparatorInputOverride(World worldIn, BlockPos pos)
{
if (((Boolean)worldIn.getBlockState(pos).getValue(POWERED)).booleanValue())
{
List<EntityMinecartCommandBlock> list = this.<EntityMinecartCommandBlock>findMinecarts(worldIn, pos, EntityMinecartCommandBlock.class, new Predicate[0]);
if (!list.isEmpty())
{
return ((EntityMinecartCommandBlock)list.get(0)).getCommandBlockLogic().getSuccessCount();
}
List<EntityMinecart> list1 = this.<EntityMinecart>findMinecarts(worldIn, pos, EntityMinecart.class, new Predicate[] {EntitySelectors.selectInventories});
if (!list1.isEmpty())
{
return Container.calcRedstoneFromInventory((IInventory)list1.get(0));
}
}
return 0;
}
示例2: getComparatorInputOverride
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos)
{
if (((Boolean)blockState.getValue(POWERED)).booleanValue())
{
List<EntityMinecartCommandBlock> list = this.<EntityMinecartCommandBlock>findMinecarts(worldIn, pos, EntityMinecartCommandBlock.class, new Predicate[0]);
if (!list.isEmpty())
{
return ((EntityMinecartCommandBlock)list.get(0)).getCommandBlockLogic().getSuccessCount();
}
List<EntityMinecart> list1 = this.<EntityMinecart>findMinecarts(worldIn, pos, EntityMinecart.class, new Predicate[] {EntitySelectors.HAS_INVENTORY});
if (!list1.isEmpty())
{
return Container.calcRedstoneFromInventory((IInventory)list1.get(0));
}
}
return 0;
}
示例3: getComparatorInputOverride
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos)
{
if (((Boolean)blockState.getValue(POWERED)).booleanValue())
{
List<EntityMinecart> carts = this.findMinecarts(worldIn, pos, EntityMinecart.class);
if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel();
List<EntityMinecartCommandBlock> list = this.<EntityMinecartCommandBlock>findMinecarts(worldIn, pos, EntityMinecartCommandBlock.class, new Predicate[0]);
if (!list.isEmpty())
{
return ((EntityMinecartCommandBlock)list.get(0)).getCommandBlockLogic().getSuccessCount();
}
List<EntityMinecart> list1 = this.<EntityMinecart>findMinecarts(worldIn, pos, EntityMinecart.class, new Predicate[] {EntitySelectors.HAS_INVENTORY});
if (!list1.isEmpty())
{
return Container.calcRedstoneFromInventory((IInventory)list1.get(0));
}
}
return 0;
}
示例4: applyDrag
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
protected void applyDrag()
{
int i = 15 - Container.calcRedstoneFromInventory(this);
float f = 0.98F + (float)i * 0.001F;
this.motionX *= (double)f;
this.motionY *= 0.0D;
this.motionZ *= (double)f;
}
示例5: applyDrag
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
protected void applyDrag()
{
float f = 0.98F;
if (this.lootTable == null)
{
int i = 15 - Container.calcRedstoneFromInventory(this);
f += (float)i * 0.001F;
}
this.motionX *= (double)f;
this.motionY *= 0.0D;
this.motionZ *= (double)f;
}
示例6: getComparatorInputOverride
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
public int getComparatorInputOverride(World worldIn, BlockPos pos)
{
return Container.calcRedstoneFromInventory(this.getLockableContainer(worldIn, pos));
}
示例7: getComparatorInputOverride
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
public int getComparatorInputOverride(World worldIn, BlockPos pos) {
return Container.calcRedstoneFromInventory(this.getLockableContainer(worldIn, pos));
}
示例8: getComparatorInputOverride
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos)
{
return Container.calcRedstoneFromInventory(this.getLockableContainer(worldIn, pos));
}
示例9: getComparatorInputOverride
import net.minecraft.inventory.Container; //导入方法依赖的package包/类
public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos)
{
return Container.calcRedstoneFromInventory((IInventory)worldIn.getTileEntity(pos));
}