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


Java PathFinder类代码示例

本文整理汇总了Java中net.minecraft.pathfinding.PathFinder的典型用法代码示例。如果您正苦于以下问题:Java PathFinder类的具体用法?Java PathFinder怎么用?Java PathFinder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getPathEntityToEntity

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity getPathEntityToEntity(Entity par1Entity, Entity par2Entity, float par3, boolean par4, boolean par5, boolean par6, boolean par7)
{
    this.theProfiler.startSection("pathfind");
    int var8 = MathHelper.floor_double(par1Entity.posX);
    int var9 = MathHelper.floor_double(par1Entity.posY + 1.0D);
    int var10 = MathHelper.floor_double(par1Entity.posZ);
    int var11 = (int)(par3 + 16.0F);
    int var12 = var8 - var11;
    int var13 = var9 - var11;
    int var14 = var10 - var11;
    int var15 = var8 + var11;
    int var16 = var9 + var11;
    int var17 = var10 + var11;
    ChunkCache var18 = new ChunkCache(this, var12, var13, var14, var15, var16, var17, 0);
    PathEntity var19 = (new PathFinder(var18, par4, par5, par6, par7)).createEntityPathTo(par1Entity, par2Entity, par3);
    this.theProfiler.endSection();
    return var19;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:19,代码来源:World.java

示例2: getEntityPathToXYZ

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity getEntityPathToXYZ(Entity par1Entity, int par2, int par3, int par4, float par5, boolean par6, boolean par7, boolean par8, boolean par9)
{
    this.theProfiler.startSection("pathfind");
    int var10 = MathHelper.floor_double(par1Entity.posX);
    int var11 = MathHelper.floor_double(par1Entity.posY);
    int var12 = MathHelper.floor_double(par1Entity.posZ);
    int var13 = (int)(par5 + 8.0F);
    int var14 = var10 - var13;
    int var15 = var11 - var13;
    int var16 = var12 - var13;
    int var17 = var10 + var13;
    int var18 = var11 + var13;
    int var19 = var12 + var13;
    ChunkCache var20 = new ChunkCache(this, var14, var15, var16, var17, var18, var19, 0);
    PathEntity var21 = (new PathFinder(var20, par6, par7, par8, par9)).createEntityPathTo(par1Entity, par2, par3, par4, par5);
    this.theProfiler.endSection();
    return var21;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:19,代码来源:World.java

示例3: getPathEntityToEntity

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity getPathEntityToEntity(Entity p_72865_1_, Entity p_72865_2_, float p_72865_3_, boolean p_72865_4_, boolean p_72865_5_, boolean p_72865_6_, boolean p_72865_7_)
{
    this.theProfiler.startSection("pathfind");
    int i = MathHelper.floor_double(p_72865_1_.posX);
    int j = MathHelper.floor_double(p_72865_1_.posY + 1.0D);
    int k = MathHelper.floor_double(p_72865_1_.posZ);
    int l = (int)(p_72865_3_ + 16.0F);
    int i1 = i - l;
    int j1 = j - l;
    int k1 = k - l;
    int l1 = i + l;
    int i2 = j + l;
    int j2 = k + l;
    ChunkCache chunkcache = new ChunkCache(this, i1, j1, k1, l1, i2, j2, 0);
    PathEntity pathentity = (new PathFinder(chunkcache, p_72865_4_, p_72865_5_, p_72865_6_, p_72865_7_)).createEntityPathTo(p_72865_1_, p_72865_2_, p_72865_3_);
    this.theProfiler.endSection();
    return pathentity;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:World.java

示例4: getEntityPathToXYZ

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity getEntityPathToXYZ(Entity p_72844_1_, int p_72844_2_, int p_72844_3_, int p_72844_4_, float p_72844_5_, boolean p_72844_6_, boolean p_72844_7_, boolean p_72844_8_, boolean p_72844_9_)
{
    this.theProfiler.startSection("pathfind");
    int l = MathHelper.floor_double(p_72844_1_.posX);
    int i1 = MathHelper.floor_double(p_72844_1_.posY);
    int j1 = MathHelper.floor_double(p_72844_1_.posZ);
    int k1 = (int)(p_72844_5_ + 8.0F);
    int l1 = l - k1;
    int i2 = i1 - k1;
    int j2 = j1 - k1;
    int k2 = l + k1;
    int l2 = i1 + k1;
    int i3 = j1 + k1;
    ChunkCache chunkcache = new ChunkCache(this, l1, i2, j2, k2, l2, i3, 0);
    PathEntity pathentity = (new PathFinder(chunkcache, p_72844_6_, p_72844_7_, p_72844_8_, p_72844_9_)).createEntityPathTo(p_72844_1_, p_72844_2_, p_72844_3_, p_72844_4_, p_72844_5_);
    this.theProfiler.endSection();
    return pathentity;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:World.java

示例5: func_72865_a

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity func_72865_a(Entity p_72865_1_, Entity p_72865_2_, float p_72865_3_, boolean p_72865_4_, boolean p_72865_5_, boolean p_72865_6_, boolean p_72865_7_) {
   this.field_72984_F.func_76320_a("pathfind");
   int var8 = MathHelper.func_76128_c(p_72865_1_.field_70165_t);
   int var9 = MathHelper.func_76128_c(p_72865_1_.field_70163_u + 1.0D);
   int var10 = MathHelper.func_76128_c(p_72865_1_.field_70161_v);
   int var11 = (int)(p_72865_3_ + 16.0F);
   int var12 = var8 - var11;
   int var13 = var9 - var11;
   int var14 = var10 - var11;
   int var15 = var8 + var11;
   int var16 = var9 + var11;
   int var17 = var10 + var11;
   ChunkCache var18 = new ChunkCache(this, var12, var13, var14, var15, var16, var17, 0);
   PathEntity var19 = (new PathFinder(var18, p_72865_4_, p_72865_5_, p_72865_6_, p_72865_7_)).func_75856_a(p_72865_1_, p_72865_2_, p_72865_3_);
   this.field_72984_F.func_76319_b();
   return var19;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:18,代码来源:World.java

示例6: func_72844_a

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity func_72844_a(Entity p_72844_1_, int p_72844_2_, int p_72844_3_, int p_72844_4_, float p_72844_5_, boolean p_72844_6_, boolean p_72844_7_, boolean p_72844_8_, boolean p_72844_9_) {
   this.field_72984_F.func_76320_a("pathfind");
   int var10 = MathHelper.func_76128_c(p_72844_1_.field_70165_t);
   int var11 = MathHelper.func_76128_c(p_72844_1_.field_70163_u);
   int var12 = MathHelper.func_76128_c(p_72844_1_.field_70161_v);
   int var13 = (int)(p_72844_5_ + 8.0F);
   int var14 = var10 - var13;
   int var15 = var11 - var13;
   int var16 = var12 - var13;
   int var17 = var10 + var13;
   int var18 = var11 + var13;
   int var19 = var12 + var13;
   ChunkCache var20 = new ChunkCache(this, var14, var15, var16, var17, var18, var19, 0);
   PathEntity var21 = (new PathFinder(var20, p_72844_6_, p_72844_7_, p_72844_8_, p_72844_9_)).func_75859_a(p_72844_1_, p_72844_2_, p_72844_3_, p_72844_4_, p_72844_5_);
   this.field_72984_F.func_76319_b();
   return var21;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:18,代码来源:World.java

示例7: getPathEntityToEntity

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity getPathEntityToEntity(Entity par1Entity, Entity par2Entity, float par3, boolean par4, boolean par5, boolean par6, boolean par7)
{
    this.theProfiler.startSection("pathfind");
    int i = MathHelper.floor_double(par1Entity.posX);
    int j = MathHelper.floor_double(par1Entity.posY + 1.0D);
    int k = MathHelper.floor_double(par1Entity.posZ);
    int l = (int)(par3 + 16.0F);
    int i1 = i - l;
    int j1 = j - l;
    int k1 = k - l;
    int l1 = i + l;
    int i2 = j + l;
    int j2 = k + l;
    ChunkCache chunkcache = new ChunkCache(this, i1, j1, k1, l1, i2, j2, 0);
    PathEntity pathentity = (new PathFinder(chunkcache, par4, par5, par6, par7)).createEntityPathTo(par1Entity, par2Entity, par3);
    this.theProfiler.endSection();
    return pathentity;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:World.java

示例8: getEntityPathToXYZ

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public PathEntity getEntityPathToXYZ(Entity par1Entity, int par2, int par3, int par4, float par5, boolean par6, boolean par7, boolean par8, boolean par9)
{
    this.theProfiler.startSection("pathfind");
    int l = MathHelper.floor_double(par1Entity.posX);
    int i1 = MathHelper.floor_double(par1Entity.posY);
    int j1 = MathHelper.floor_double(par1Entity.posZ);
    int k1 = (int)(par5 + 8.0F);
    int l1 = l - k1;
    int i2 = i1 - k1;
    int j2 = j1 - k1;
    int k2 = l + k1;
    int l2 = i1 + k1;
    int i3 = j1 + k1;
    ChunkCache chunkcache = new ChunkCache(this, l1, i2, j2, k2, l2, i3, 0);
    PathEntity pathentity = (new PathFinder(chunkcache, par6, par7, par8, par9)).createEntityPathTo(par1Entity, par2, par3, par4, par5);
    this.theProfiler.endSection();
    return pathentity;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:World.java

示例9: worldObjgetEntityPathToXYZ

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
private PathEntity worldObjgetEntityPathToXYZ(Entity par1Entity, int par2, int par3, int par4, float par5, boolean par6, boolean par7,
											  boolean par8, boolean par9)
{
	int l = MathHelper.floor_double(par1Entity.posX);
	int i1 = MathHelper.floor_double(par1Entity.posY);
	int j1 = MathHelper.floor_double(par1Entity.posZ);
	int k1 = (int) (par5 + 8.0F);
	int l1 = l - k1;
	int i2 = i1 - k1;
	int j2 = j1 - k1;
	int k2 = l + k1;
	int l2 = i1 + k1;
	int i3 = j1 + k1;
	ChunkCache chunkcache = new ChunkCache(worldObj, l1, i2, j2, k2, l2, i3, 0);
	PathEntity pathentity = (new PathFinder(chunkcache, par6, par7, par8, par9)).createEntityPathTo(par1Entity, par2, par3, par4, par5);
	return pathentity;
}
 
开发者ID:Ubiquitous-Spice,项目名称:Modjam-3,代码行数:18,代码来源:SwarmPathNavigate.java

示例10: getPathEntityToEntity

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public Path getPathEntityToEntity(Entity entity, Entity targetEntity, float range) {
  int targX = MathHelper.floor(targetEntity.posX);
  int targY = MathHelper.floor(targetEntity.posY + 1.0D);
  int targZ = MathHelper.floor(targetEntity.posZ);

  PathFinder pf = new PathFinder(new WalkNodeProcessor());
  return pf.findPath(entity.world, (EntityLiving) entity, new BlockPos(targX, targY, targZ), range);
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:9,代码来源:SilverfishAttractorHandler.java

示例11: getPathFinder

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
@Override
protected PathFinder getPathFinder() {
    this.nodeProcessor = new NodeProcessorDrone();
    return new PathfinderDrone(this.nodeProcessor);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:6,代码来源:EntityPathNavigateDrone.java

示例12: getPathFinder

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
public static PathFinder getPathFinder() {
    WalkNodeProcessor processor = new WalkNodeProcessor();
    processor.setCanEnterDoors(true);
    return new PathFinder(processor);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:6,代码来源:PneumaticCraftUtils.java

示例13: getPathFinder

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
@Override
protected PathFinder getPathFinder() {
    return new PathFinder(new ZigZagNodeProcessor());
}
 
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:5,代码来源:PathNavigateZigZag.java

示例14: getPathFinder

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
@Override
protected PathFinder getPathFinder() {
    return new PathFinder(new NodeProcessorFlying());
}
 
开发者ID:ata4,项目名称:dragon-mounts,代码行数:5,代码来源:PathNavigateFlying.java

示例15: getPathFinder

import net.minecraft.pathfinding.PathFinder; //导入依赖的package包/类
@Override
protected PathFinder getPathFinder() {
  nodeProcessor = new FlyNodeProcessor();
  return new FlyingPathFinder(nodeProcessor);
}
 
开发者ID:SleepyTrousers,项目名称:EnderZoo,代码行数:6,代码来源:FlyingPathNavigate.java


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