本文整理了Java中net.minecraft.world.World.setSkylightSubtracted()
方法的一些代码示例,展示了World.setSkylightSubtracted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.setSkylightSubtracted()
方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:setSkylightSubtracted
暂无
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public void setSkylightSubtracted(int newSkylightSubtracted) {
wrapped.setSkylightSubtracted(newSkylightSubtracted);
}
代码示例来源:origin: amadornes/MCMultiPart
@Override
public void setSkylightSubtracted(int newSkylightSubtracted) {
getActualWorld().setSkylightSubtracted(newSkylightSubtracted);
}
代码示例来源:origin: TeamLapen/Vampirism
protected boolean isLowLightLevel() {
BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ);
if (this.world.getLightFor(EnumSkyBlock.SKY, blockpos) > this.rand.nextInt(32)) {
return false;
} else {
int i = this.world.getLightFromNeighbors(blockpos);
if (this.world.isThundering()) {
int j = this.world.getSkylightSubtracted();
this.world.setSkylightSubtracted(10);
i = this.world.getLightFromNeighbors(blockpos);
this.world.setSkylightSubtracted(j);
}
return i <= this.rand.nextInt(8);
}
}
代码示例来源:origin: Silentine/GrimoireOfGaia
/**
* @see EntityMob
*/
private boolean isValidLightLevel() {
BlockPos blockpos = new BlockPos(posX, getEntityBoundingBox().minY, posZ);
if (world.getLightFor(EnumSkyBlock.SKY, blockpos) > rand.nextInt(32)) {
return false;
} else {
int i = world.getLightFromNeighbors(blockpos);
if (world.isThundering()) {
int j = world.getSkylightSubtracted();
world.setSkylightSubtracted(10);
i = world.getLightFromNeighbors(blockpos);
world.setSkylightSubtracted(j);
}
return i <= rand.nextInt(8);
}
}
代码示例来源:origin: Silentine/GrimoireOfGaia
/**
* Checks to make sure the light is not too bright where the mob is spawning
*/
private boolean isValidLightLevel() {
BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ);
if (this.world.getLightFor(EnumSkyBlock.SKY, blockpos) > this.rand.nextInt(32)) {
return false;
} else {
int i = this.world.getLightFromNeighbors(blockpos);
if (this.world.isThundering()) {
int j = this.world.getSkylightSubtracted();
this.world.setSkylightSubtracted(10);
i = this.world.getLightFromNeighbors(blockpos);
this.world.setSkylightSubtracted(j);
}
return i <= this.rand.nextInt(8);
}
}
代码示例来源:origin: CyclopsMC/EvilCraft
protected boolean isValidLightLevel()
{
BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ);
if (this.world.getLightFor(EnumSkyBlock.SKY, blockpos) > this.rand.nextInt(32))
{
return false;
}
else
{
int i = this.world.getLightFromNeighbors(blockpos);
if (this.world.isThundering())
{
int j = this.world.getSkylightSubtracted();
this.world.setSkylightSubtracted(10);
i = this.world.getLightFromNeighbors(blockpos);
this.world.setSkylightSubtracted(j);
}
return i <= this.rand.nextInt(8);
}
}
代码示例来源:origin: CoFH/ThermalFoundation
@Override
protected boolean isValidLightLevel() {
if (!restrictLightLevel()) {
return true;
}
BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ);
if (this.world.getLightFor(EnumSkyBlock.SKY, blockpos) > this.rand.nextInt(32)) {
return false;
} else {
int i = this.world.getLightFromNeighbors(blockpos);
if (this.world.isThundering()) {
int j = this.world.getSkylightSubtracted();
this.world.setSkylightSubtracted(10);
i = this.world.getLightFromNeighbors(blockpos);
this.world.setSkylightSubtracted(j);
}
return i <= this.rand.nextInt(getSpawnLightLevel());
}
}
内容来源于网络,如有侵权,请联系作者删除!