本文整理汇总了Java中net.minecraft.entity.EntityMinecartCommandBlock类的典型用法代码示例。如果您正苦于以下问题:Java EntityMinecartCommandBlock类的具体用法?Java EntityMinecartCommandBlock怎么用?Java EntityMinecartCommandBlock使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntityMinecartCommandBlock类属于net.minecraft.entity包,在下文中一共展示了EntityMinecartCommandBlock类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: func_180458_a
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
public static EntityMinecart func_180458_a(World worldIn, double p_180458_1_, double p_180458_3_, double p_180458_5_, EntityMinecart.EnumMinecartType p_180458_7_)
{
switch (p_180458_7_)
{
case CHEST:
return new EntityMinecartChest(worldIn, p_180458_1_, p_180458_3_, p_180458_5_);
case FURNACE:
return new EntityMinecartFurnace(worldIn, p_180458_1_, p_180458_3_, p_180458_5_);
case TNT:
return new EntityMinecartTNT(worldIn, p_180458_1_, p_180458_3_, p_180458_5_);
case SPAWNER:
return new EntityMinecartMobSpawner(worldIn, p_180458_1_, p_180458_3_, p_180458_5_);
case HOPPER:
return new EntityMinecartHopper(worldIn, p_180458_1_, p_180458_3_, p_180458_5_);
case COMMAND_BLOCK:
return new EntityMinecartCommandBlock(worldIn, p_180458_1_, p_180458_3_, p_180458_5_);
default:
return new EntityMinecartEmpty(worldIn, p_180458_1_, p_180458_3_, p_180458_5_);
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:27,代码来源:EntityMinecart.java
示例2: getComparatorInputOverride
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的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;
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:22,代码来源:BlockRailDetector.java
示例3: getComparatorInputOverride
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int i)
{
if ((world.getBlockMetadata(x, y, z) & 8) > 0)
{
float f = 0.125F;
List list = world.getEntitiesWithinAABB(EntityMinecartCommandBlock.class, AxisAlignedBB.getBoundingBox((double)((float)x + f), (double)y, (double)((float)z + f), (double)((float)(x + 1) - f), (double)((float)(y + 1) - f), (double)((float)(z + 1) - f)));
if (list.size() > 0)
{
return ((EntityMinecartCommandBlock)list.get(0)).func_145822_e().func_145760_g();
}
List list1 = world.selectEntitiesWithinAABB(EntityMinecart.class, AxisAlignedBB.getBoundingBox((double)((float)x + f), (double)y, (double)((float)z + f), (double)((float)(x + 1) - f), (double)((float)(y + 1) - f), (double)((float)(z + 1) - f)), IEntitySelector.selectInventories);
if (list1.size() > 0)
{
return Container.calcRedstoneFromInventory((IInventory)list1.get(0));
}
}
return 0;
}
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:24,代码来源:RailMonoMagnetDetector.java
示例4: getComparatorInputOverride
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
public int getComparatorInputOverride(World p_149736_1_, int p_149736_2_, int p_149736_3_, int p_149736_4_, int p_149736_5_)
{
if ((p_149736_1_.getBlockMetadata(p_149736_2_, p_149736_3_, p_149736_4_) & 8) > 0)
{
float var6 = 0.125F;
List var7 = p_149736_1_.getEntitiesWithinAABB(EntityMinecartCommandBlock.class, AxisAlignedBB.getAABBPool().getAABB((double)((float)p_149736_2_ + var6), (double)p_149736_3_, (double)((float)p_149736_4_ + var6), (double)((float)(p_149736_2_ + 1) - var6), (double)((float)(p_149736_3_ + 1) - var6), (double)((float)(p_149736_4_ + 1) - var6)));
if (var7.size() > 0)
{
return ((EntityMinecartCommandBlock)var7.get(0)).func_145822_e().func_145760_g();
}
List var8 = p_149736_1_.selectEntitiesWithinAABB(EntityMinecart.class, AxisAlignedBB.getAABBPool().getAABB((double)((float)p_149736_2_ + var6), (double)p_149736_3_, (double)((float)p_149736_4_ + var6), (double)((float)(p_149736_2_ + 1) - var6), (double)((float)(p_149736_3_ + 1) - var6), (double)((float)(p_149736_4_ + 1) - var6)), IEntitySelector.selectInventories);
if (var8.size() > 0)
{
return Container.calcRedstoneFromInventory((IInventory)var8.get(0));
}
}
return 0;
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:23,代码来源:BlockRailDetector.java
示例5: createMinecart
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
public static EntityMinecart createMinecart(World p_94090_0_, double p_94090_1_, double p_94090_3_, double p_94090_5_, int p_94090_7_)
{
switch (p_94090_7_)
{
case 1:
return new EntityMinecartChest(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_);
case 2:
return new EntityMinecartFurnace(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_);
case 3:
return new EntityMinecartTNT(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_);
case 4:
return new EntityMinecartMobSpawner(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_);
case 5:
return new EntityMinecartHopper(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_);
case 6:
return new EntityMinecartCommandBlock(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_);
default:
return new EntityMinecartEmpty(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_);
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:21,代码来源:EntityMinecart.java
示例6: getComparatorInputOverride
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
public int getComparatorInputOverride(World p_149736_1_, int p_149736_2_, int p_149736_3_, int p_149736_4_, int p_149736_5_)
{
if ((p_149736_1_.getBlockMetadata(p_149736_2_, p_149736_3_, p_149736_4_) & 8) > 0)
{
float f = 0.125F;
List list = p_149736_1_.getEntitiesWithinAABB(EntityMinecartCommandBlock.class, AxisAlignedBB.getBoundingBox((double)((float)p_149736_2_ + f), (double)p_149736_3_, (double)((float)p_149736_4_ + f), (double)((float)(p_149736_2_ + 1) - f), (double)((float)(p_149736_3_ + 1) - f), (double)((float)(p_149736_4_ + 1) - f)));
if (list.size() > 0)
{
return ((EntityMinecartCommandBlock)list.get(0)).func_145822_e().func_145760_g();
}
List list1 = p_149736_1_.selectEntitiesWithinAABB(EntityMinecart.class, AxisAlignedBB.getBoundingBox((double)((float)p_149736_2_ + f), (double)p_149736_3_, (double)((float)p_149736_4_ + f), (double)((float)(p_149736_2_ + 1) - f), (double)((float)(p_149736_3_ + 1) - f), (double)((float)(p_149736_4_ + 1) - f)), IEntitySelector.selectInventories);
if (list1.size() > 0)
{
return Container.calcRedstoneFromInventory((IInventory)list1.get(0));
}
}
return 0;
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:23,代码来源:BlockRailDetector.java
示例7: createMinecart
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
/**
* Creates a new minecart of the specified type in the specified location in the given world. par0World - world to
* create the minecart in, double par1,par3,par5 represent x,y,z respectively. int par7 specifies the type: 1 for
* MinecartChest, 2 for MinecartFurnace, 3 for MinecartTNT, 4 for MinecartMobSpawner, 5 for MinecartHopper and 0 for
* a standard empty minecart
*/
public static EntityMinecart createMinecart(World par0World, double par1, double par3, double par5, int par7)
{
switch (par7)
{
case 1:
return new EntityMinecartChest(par0World, par1, par3, par5);
case 2:
return new EntityMinecartFurnace(par0World, par1, par3, par5);
case 3:
return new EntityMinecartTNT(par0World, par1, par3, par5);
case 4:
return new EntityMinecartMobSpawner(par0World, par1, par3, par5);
case 5:
return new EntityMinecartHopper(par0World, par1, par3, par5);
case 6:
return new EntityMinecartCommandBlock(par0World, par1, par3, par5);
default:
return new EntityMinecartEmpty(par0World, par1, par3, par5);
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:33,代码来源:EntityMinecart.java
示例8: CommandMinecart
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
public CommandMinecart() {
super(new EntityMinecartCommandBlock(null));
}
开发者ID:asusoda,项目名称:Corundum,代码行数:4,代码来源:CommandMinecart.java
示例9: fromMC
import net.minecraft.entity.EntityMinecartCommandBlock; //导入依赖的package包/类
/** This method is used to create a new instance of {@link Entity Corundum Entity} to wrap around the given {@link Minecraft net.minecraft.entity.Entity}.
*
* @param entityMC
* is the Minecraft Entity that will wrapped with a new {@link Entity Corundum Entity} <tt>Object</tt>.
* @return a new Entity created using the given {@link net.minecraft.entity.Entity Minecraft Entity}. */
@Override
public CommandMinecart fromMC(EntityMinecartCommandBlock entityMC) {
return new CommandMinecart(entityMC);
}
开发者ID:asusoda,项目名称:Corundum,代码行数:10,代码来源:CommandMinecart.java
注:本文中的net.minecraft.entity.EntityMinecartCommandBlock类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论