本文整理汇总了Java中net.minecraft.village.VillageDoorInfo类的典型用法代码示例。如果您正苦于以下问题:Java VillageDoorInfo类的具体用法?Java VillageDoorInfo怎么用?Java VillageDoorInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VillageDoorInfo类属于net.minecraft.village包,在下文中一共展示了VillageDoorInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findNearestDoor
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private VillageDoorInfo findNearestDoor(Village villageIn)
{
VillageDoorInfo villagedoorinfo = null;
int i = Integer.MAX_VALUE;
for (VillageDoorInfo villagedoorinfo1 : villageIn.getVillageDoorInfoList())
{
int j = villagedoorinfo1.getDistanceSquared(MathHelper.floor_double(this.theEntity.posX), MathHelper.floor_double(this.theEntity.posY), MathHelper.floor_double(this.theEntity.posZ));
if (j < i && !this.doesDoorListContain(villagedoorinfo1))
{
villagedoorinfo = villagedoorinfo1;
i = j;
}
}
return villagedoorinfo;
}
示例2: findNearestDoor
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private VillageDoorInfo findNearestDoor(Village villageIn)
{
VillageDoorInfo villagedoorinfo = null;
int i = Integer.MAX_VALUE;
for (VillageDoorInfo villagedoorinfo1 : villageIn.getVillageDoorInfoList())
{
int j = villagedoorinfo1.getDistanceSquared(MathHelper.floor(this.theEntity.posX), MathHelper.floor(this.theEntity.posY), MathHelper.floor(this.theEntity.posZ));
if (j < i && !this.doesDoorListContain(villagedoorinfo1))
{
villagedoorinfo = villagedoorinfo1;
i = j;
}
}
return villagedoorinfo;
}
示例3: func_75412_a
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private VillageDoorInfo func_75412_a(Village par1Village)
{
VillageDoorInfo var2 = null;
int var3 = Integer.MAX_VALUE;
List var4 = par1Village.getVillageDoorInfoList();
Iterator var5 = var4.iterator();
while (var5.hasNext())
{
VillageDoorInfo var6 = (VillageDoorInfo)var5.next();
int var7 = var6.getDistanceSquared(MathHelper.floor_double(this.theEntity.posX), MathHelper.floor_double(this.theEntity.posY), MathHelper.floor_double(this.theEntity.posZ));
if (var7 < var3 && !this.func_75413_a(var6))
{
var2 = var6;
var3 = var7;
}
}
return var2;
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:EntityAIMoveThroughVillage.java
示例4: func_75412_a
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private VillageDoorInfo func_75412_a(Village p_75412_1_)
{
VillageDoorInfo villagedoorinfo = null;
int i = Integer.MAX_VALUE;
List list = p_75412_1_.getVillageDoorInfoList();
Iterator iterator = list.iterator();
while (iterator.hasNext())
{
VillageDoorInfo villagedoorinfo1 = (VillageDoorInfo)iterator.next();
int j = villagedoorinfo1.getDistanceSquared(MathHelper.floor_double(this.theEntity.posX), MathHelper.floor_double(this.theEntity.posY), MathHelper.floor_double(this.theEntity.posZ));
if (j < i && !this.func_75413_a(villagedoorinfo1))
{
villagedoorinfo = villagedoorinfo1;
i = j;
}
}
return villagedoorinfo;
}
示例5: func_75412_a
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private VillageDoorInfo func_75412_a(Village p_75412_1_) {
VillageDoorInfo var2 = null;
int var3 = Integer.MAX_VALUE;
List var4 = p_75412_1_.func_75558_f();
Iterator var5 = var4.iterator();
while(var5.hasNext()) {
VillageDoorInfo var6 = (VillageDoorInfo)var5.next();
int var7 = var6.func_75474_b(MathHelper.func_76128_c(this.field_75420_a.field_70165_t), MathHelper.func_76128_c(this.field_75420_a.field_70163_u), MathHelper.func_76128_c(this.field_75420_a.field_70161_v));
if(var7 < var3 && !this.func_75413_a(var6)) {
var2 = var6;
var3 = var7;
}
}
return var2;
}
示例6: func_75564_b
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
public VillageDoorInfo func_75564_b(int p_75564_1_, int p_75564_2_, int p_75564_3_) {
VillageDoorInfo var4 = null;
int var5 = Integer.MAX_VALUE;
Iterator var6 = this.field_75584_b.iterator();
while(var6.hasNext()) {
VillageDoorInfo var7 = (VillageDoorInfo)var6.next();
int var8 = var7.func_75474_b(p_75564_1_, p_75564_2_, p_75564_3_);
if(var8 < var5) {
var4 = var7;
var5 = var8;
}
}
return var4;
}
示例7: func_75569_c
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
public VillageDoorInfo func_75569_c(int p_75569_1_, int p_75569_2_, int p_75569_3_) {
VillageDoorInfo var4 = null;
int var5 = Integer.MAX_VALUE;
Iterator var6 = this.field_75584_b.iterator();
while(var6.hasNext()) {
VillageDoorInfo var7 = (VillageDoorInfo)var6.next();
int var8 = var7.func_75474_b(p_75569_1_, p_75569_2_, p_75569_3_);
if(var8 > 256) {
var8 *= 1000;
} else {
var8 = var7.func_75468_f();
}
if(var8 < var5) {
var4 = var7;
var5 = var8;
}
}
return var4;
}
示例8: func_75557_k
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private void func_75557_k() {
boolean var1 = false;
boolean var2 = this.field_75586_a.field_73012_v.nextInt(50) == 0;
Iterator var3 = this.field_75584_b.iterator();
while(var3.hasNext()) {
VillageDoorInfo var4 = (VillageDoorInfo)var3.next();
if(var2) {
var4.func_75466_d();
}
if(!this.func_75574_f(var4.field_75481_a, var4.field_75479_b, var4.field_75480_c) || Math.abs(this.field_75581_g - var4.field_75475_f) > 1200) {
this.field_75585_c.field_71574_a -= var4.field_75481_a;
this.field_75585_c.field_71572_b -= var4.field_75479_b;
this.field_75585_c.field_71573_c -= var4.field_75480_c;
var1 = true;
var4.field_75476_g = true;
var3.remove();
}
}
if(var1) {
this.func_75573_l();
}
}
示例9: func_75546_a
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private void func_75546_a(ChunkCoordinates p_75546_1_) {
byte var2 = 16;
byte var3 = 4;
byte var4 = 16;
for(int var5 = p_75546_1_.field_71574_a - var2; var5 < p_75546_1_.field_71574_a + var2; ++var5) {
for(int var6 = p_75546_1_.field_71572_b - var3; var6 < p_75546_1_.field_71572_b + var3; ++var6) {
for(int var7 = p_75546_1_.field_71573_c - var4; var7 < p_75546_1_.field_71573_c + var4; ++var7) {
if(this.func_75541_e(var5, var6, var7)) {
VillageDoorInfo var8 = this.func_75547_b(var5, var6, var7);
if(var8 == null) {
this.func_75542_c(var5, var6, var7);
} else {
var8.field_75475_f = this.field_75553_e;
}
}
}
}
}
}
示例10: func_75412_a
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private VillageDoorInfo func_75412_a(Village par1Village)
{
VillageDoorInfo villagedoorinfo = null;
int i = Integer.MAX_VALUE;
List list = par1Village.getVillageDoorInfoList();
Iterator iterator = list.iterator();
while (iterator.hasNext())
{
VillageDoorInfo villagedoorinfo1 = (VillageDoorInfo)iterator.next();
int j = villagedoorinfo1.getDistanceSquared(MathHelper.floor_double(this.theEntity.posX), MathHelper.floor_double(this.theEntity.posY), MathHelper.floor_double(this.theEntity.posZ));
if (j < i && !this.func_75413_a(villagedoorinfo1))
{
villagedoorinfo = villagedoorinfo1;
i = j;
}
}
return villagedoorinfo;
}
示例11: doesDoorListContain
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private boolean doesDoorListContain(VillageDoorInfo doorInfoIn)
{
for (VillageDoorInfo villagedoorinfo : this.doorList)
{
if (doorInfoIn.getDoorBlockPos().equals(villagedoorinfo.getDoorBlockPos()))
{
return true;
}
}
return false;
}
示例12: func_75576_a
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
public void func_75576_a(VillageDoorInfo p_75576_1_) {
this.field_75584_b.add(p_75576_1_);
this.field_75585_c.field_71574_a += p_75576_1_.field_75481_a;
this.field_75585_c.field_71572_b += p_75576_1_.field_75479_b;
this.field_75585_c.field_71573_c += p_75576_1_.field_75480_c;
this.func_75573_l();
this.field_75580_f = p_75576_1_.field_75475_f;
}
示例13: func_82690_a
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
public void func_82690_a(NBTTagCompound p_82690_1_) {
this.field_75588_h = p_82690_1_.func_74762_e("PopSize");
this.field_75583_e = p_82690_1_.func_74762_e("Radius");
this.field_75587_j = p_82690_1_.func_74762_e("Golems");
this.field_75580_f = p_82690_1_.func_74762_e("Stable");
this.field_75581_g = p_82690_1_.func_74762_e("Tick");
this.field_82694_i = p_82690_1_.func_74762_e("MTick");
this.field_75582_d.field_71574_a = p_82690_1_.func_74762_e("CX");
this.field_75582_d.field_71572_b = p_82690_1_.func_74762_e("CY");
this.field_75582_d.field_71573_c = p_82690_1_.func_74762_e("CZ");
this.field_75585_c.field_71574_a = p_82690_1_.func_74762_e("ACX");
this.field_75585_c.field_71572_b = p_82690_1_.func_74762_e("ACY");
this.field_75585_c.field_71573_c = p_82690_1_.func_74762_e("ACZ");
NBTTagList var2 = p_82690_1_.func_74761_m("Doors");
for(int var3 = 0; var3 < var2.func_74745_c(); ++var3) {
NBTTagCompound var4 = (NBTTagCompound)var2.func_74743_b(var3);
VillageDoorInfo var5 = new VillageDoorInfo(var4.func_74762_e("X"), var4.func_74762_e("Y"), var4.func_74762_e("Z"), var4.func_74762_e("IDX"), var4.func_74762_e("IDZ"), var4.func_74762_e("TS"));
this.field_75584_b.add(var5);
}
NBTTagList var6 = p_82690_1_.func_74761_m("Players");
for(int var7 = 0; var7 < var6.func_74745_c(); ++var7) {
NBTTagCompound var8 = (NBTTagCompound)var6.func_74743_b(var7);
this.field_82693_j.put(var8.func_74779_i("Name"), Integer.valueOf(var8.func_74762_e("S")));
}
}
示例14: func_75545_e
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
private void func_75545_e() {
int var1 = 0;
while(var1 < this.field_75555_c.size()) {
VillageDoorInfo var2 = (VillageDoorInfo)this.field_75555_c.get(var1);
boolean var3 = false;
Iterator var4 = this.field_75552_d.iterator();
while(true) {
if(var4.hasNext()) {
Village var5 = (Village)var4.next();
int var6 = (int)var5.func_75577_a().func_71569_e(var2.field_75481_a, var2.field_75479_b, var2.field_75480_c);
int var7 = 32 + var5.func_75568_b();
if(var6 > var7 * var7) {
continue;
}
var5.func_75576_a(var2);
var3 = true;
}
if(!var3) {
Village var8 = new Village(this.field_75556_a);
var8.func_75576_a(var2);
this.field_75552_d.add(var8);
this.func_76185_a();
}
++var1;
break;
}
}
this.field_75555_c.clear();
}
示例15: addCityToVillages
import net.minecraft.village.VillageDoorInfo; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void addCityToVillages(World world, int id) {
if (world != null && world.provider.dimensionId != CITY_TYPE_UNDERGROUND) {
if (world.villageCollectionObj != null) {
Village city = new Village(world);
if (cityDoors.containsKey(id)) {
for (VillageDoorInfo door : cityDoors.get(id))
if (door != null)
city.addVillageDoorInfo(door);
world.villageCollectionObj.getVillageList().add(city);
cityDoors.remove(id);
}
}
}
}