本文整理了Java中net.minecraft.block.Block.setLightLevel()
方法的一些代码示例,展示了Block.setLightLevel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.setLightLevel()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:setLightLevel
暂无
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockFireBase() {
super();
this.setHardness(0.0F).setLightLevel(1.0F);
this.enableStats = false;
this.blockSoundType = SoundType.CLOTH;
}
代码示例来源:origin: CyclopsMC/IntegratedDynamics
@Override
protected ConfigurableBlockLeaves initSubInstance() {
return (ConfigurableBlockLeaves) new ConfigurableBlockLeaves(this) {
@Override
public Item getItemDropped(IBlockState iBlockState, Random random, int i) {
return Item.getItemFromBlock(BlockMenrilSaplingConfig._instance.getBlockInstance());
}
@Override
public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
super.getDrops(drops, world, pos, state, fortune);
if(world instanceof World && !((World) world).isRemote) {
if(((World) world).rand.nextInt(berriesDropChance) == 0) {
drops.add(new ItemStack(ItemMenrilBerriesConfig._instance.getItemInstance()));
}
}
}
@SuppressWarnings("deprecation")
@Override
public SoundType getSoundType() {
return SoundType.GROUND;
}
@Override
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
return new ItemStack(this);
}
}.setHardness(0.2F).setLightLevel(0.65F).setLightOpacity(1);
}
代码示例来源:origin: SonarSonic/Calculator
gas_lantern_on = new GasLantern(true).setHardness(0.1F).setLightLevel(0.9375F).setUnlocalizedName("GasLanternOn").setRegistryName(CalculatorConstants.MODID, "GasLanternOn");
ForgeRegistries.BLOCKS.register(gas_lantern_on);
ForgeRegistries.ITEMS.register(new SonarBlockTip(gas_lantern_on).setRegistryName(CalculatorConstants.MODID, "GasLanternOn"));
basic_lantern = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "Lantern", new BasicLantern().setHardness(0.1F).setLightLevel(0.9375F).setLightOpacity(100));
SonarRegister.registerTileEntity(TileEntityGasLantern.class, CalculatorConstants.MODID, "Lantern");
内容来源于网络,如有侵权,请联系作者删除!