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


Java Blocks.stained_glass_pane方法代码示例

本文整理汇总了Java中net.minecraft.init.Blocks.stained_glass_pane方法的典型用法代码示例。如果您正苦于以下问题:Java Blocks.stained_glass_pane方法的具体用法?Java Blocks.stained_glass_pane怎么用?Java Blocks.stained_glass_pane使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.init.Blocks的用法示例。


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

示例1: canPaneConnectToBlock

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
public final boolean canPaneConnectToBlock(Block blockIn)
{
    return blockIn.isFullBlock() || blockIn == this || blockIn == Blocks.glass || blockIn == Blocks.stained_glass || blockIn == Blocks.stained_glass_pane || blockIn instanceof BlockPane;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BlockPane.java

示例2: updateSegments

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
private void updateSegments() {
	int x = xCoord;
	int y = yCoord;
	int z = zCoord;
	segments.clear();
	TileEntityNewBeacon.BeamSegment beamsegment = new TileEntityNewBeacon.BeamSegment(EntitySheep.fleeceColorTable[0]);
	segments.add(beamsegment);
	boolean flag = true;

	for (int i = y + 1; i < worldObj.getActualHeight(); i++) {
		Block iblockstate = worldObj.getBlock(x, i, z);
		float[] colours;

		if (iblockstate == Blocks.stained_glass)
			colours = EntitySheep.fleeceColorTable[worldObj.getBlockMetadata(x, i, z)];
		else {
			if (iblockstate != Blocks.stained_glass_pane) {
				if (iblockstate.getLightOpacity() >= 15) {
					segments.clear();
					break;
				}

				beamsegment.func_177262_a();
				continue;
			}

			colours = EntitySheep.fleeceColorTable[worldObj.getBlockMetadata(x, i, z)];
		}

		if (!flag)
			colours = new float[] { (beamsegment.func_177263_b()[0] + colours[0]) / 2.0F, (beamsegment.func_177263_b()[1] + colours[1]) / 2.0F, (beamsegment.func_177263_b()[2] + colours[2]) / 2.0F };

		if (Arrays.equals(colours, beamsegment.func_177263_b()))
			beamsegment.func_177262_a();
		else {
			beamsegment = new TileEntityNewBeacon.BeamSegment(colours);
			segments.add(beamsegment);
		}

		flag = false;
	}
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:43,代码来源:TileEntityNewBeacon.java


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