本文整理匯總了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;
}
示例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;
}
}