本文整理了Java中net.minecraft.world.World.isMaterialInBB()
方法的一些代码示例,展示了World.isMaterialInBB()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.isMaterialInBB()
方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:isMaterialInBB
暂无
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public boolean isMaterialInBB(@Nonnull AxisAlignedBB bb, @Nonnull Material materialIn) {
return wrapped.isMaterialInBB(bb, materialIn);
}
代码示例来源:origin: amadornes/MCMultiPart
@Override
public boolean isMaterialInBB(AxisAlignedBB bb, Material materialIn) {
return getActualWorld().isMaterialInBB(bb, materialIn);
}
代码示例来源:origin: Alex-the-666/Ice_and_Fire
public boolean isInSandStrict() {
return this.getControllingPassenger() == null && this.world.isMaterialInBB(this.getEntityBoundingBox(), Material.SAND);
}
代码示例来源:origin: Alex-the-666/Ice_and_Fire
public boolean isInSand() {
return this.getControllingPassenger() == null && this.world.isMaterialInBB(this.getEntityBoundingBox().grow(0.25D, 0.25D, 0.25D), Material.SAND);
}
代码示例来源:origin: vadis365/TheErebus
@Override
public boolean getCanSpawnHere() {
return getEntityWorld().checkNoEntityCollision(getEntityBoundingBox()) && getEntityWorld().getCollisionBoxes(this, getEntityBoundingBox()).isEmpty() && getEntityWorld().isMaterialInBB(getEntityBoundingBox(), Material.LAVA);
}
代码示例来源:origin: vadis365/TheErebus
@Override
public boolean getCanSpawnHere() {
int y = MathHelper.floor(getEntityBoundingBox().minY);
if(y <= ChunkProviderErebus.swampWaterHeight)
return getEntityWorld().checkNoEntityCollision(getEntityBoundingBox()) && getEntityWorld().getCollisionBoxes(this, getEntityBoundingBox()).isEmpty() && getEntityWorld().isMaterialInBB(getEntityBoundingBox(), Material.WATER);
return false;
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
/**
* code to set Y motion on a surface or subsurface water vehicle
*
* @param floats if the vehicle should return to the surface if it is underwater (false for submarines)
*/
protected int handleBoatBob(boolean floats) {
float bitHeight = vehicle.height * 0.2f;
AxisAlignedBB bb;
int submergedBits = 0;
for (int i = 0; i < 5; i++) {
bb = new AxisAlignedBB(vehicle.getEntityBoundingBox().minX, vehicle.getEntityBoundingBox().minY + (i * bitHeight), vehicle.getEntityBoundingBox().minZ, vehicle.getEntityBoundingBox().maxX, vehicle.getEntityBoundingBox().minY + ((1 + i) * bitHeight), vehicle.getEntityBoundingBox().maxZ);
if (vehicle.world.isMaterialInBB(bb, Material.WATER)) {
submergedBits++;
} else {
break;
}
}
submergedBits -= 2;
if (!floats && submergedBits > 0) {
submergedBits = 0;
}
if (submergedBits < 0) {
vehicle.motionY -= 9.81f * 0.05f * 0.05f;
} else {
vehicle.motionY += (float) submergedBits * 0.02f;
vehicle.motionY *= 0.8f;
}
return submergedBits;
}
代码示例来源:origin: ldtteam/minecolonies
if (CompatibilityUtils.getWorld(this).isMaterialInBB(axisAlignedBB1, Material.WATER))
内容来源于网络,如有侵权,请联系作者删除!