本文整理汇总了Java中thaumcraft.api.aspects.AspectList.visSize方法的典型用法代码示例。如果您正苦于以下问题:Java AspectList.visSize方法的具体用法?Java AspectList.visSize怎么用?Java AspectList.visSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thaumcraft.api.aspects.AspectList
的用法示例。
在下文中一共展示了AspectList.visSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: breakBlock
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
super.breakBlock(world, x, y, z, block, meta);
TileEntity te = world.getTileEntity(x, y, z);
if(te == null || !(te instanceof TileEssentiaCompressor)) return;
TileEssentiaCompressor compressor = (TileEssentiaCompressor) te;
if(compressor.isMultiblockFormed()) {
AspectList al = compressor.getAspects();
if(al.visSize() > 0) {
ExplosionHelper.taintplosion(world, x, y, z, true, 2, 2.0F, 4, 20);
world.setBlockToAir(x, y, z);
} else {
ExplosionHelper.taintplosion(world, x, y, z, false, 2, 2.0F, 4, 20);
world.setBlockToAir(x, y, z);
}
}
}
示例2: doDrain
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
private boolean doDrain(Aspect a, List<WorldCoordinates> coordinates) {
for (WorldCoordinates coordinate : coordinates) {
TileEntity sourceTile = worldObj.getTileEntity(coordinate.x, coordinate.y, coordinate.z);
if ((sourceTile == null) || (!(sourceTile instanceof IAspectSource))) {
continue;
}
if(sourceTile instanceof TileEssentiaCompressor) continue;
IAspectSource as = (IAspectSource)sourceTile;
AspectList contains = as.getAspects();
if(contains == null || contains.visSize() > al.visSize()) continue;
if(!canAccept(a)) continue;
if (as.takeFromContainer(a, 1)) {
PacketHandler.INSTANCE.sendToAllAround(new PacketFXEssentiaSource(xCoord, yCoord + 1, zCoord,
(byte)(xCoord - coordinate.x), (byte)(yCoord - coordinate.y + 1), (byte)(zCoord - coordinate.z),
a.getColor()), new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord + 1, zCoord, 32.0D));
return true;
}
}
return false;
}
示例3: doExplosion
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
private void doExplosion() {
AspectList al = getAspects();
if(al.visSize() > 0) {
ExplosionHelper.taintplosion(worldObj, xCoord, yCoord, zCoord, true, 2, 2.0F, 4, 20);
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
} else {
ExplosionHelper.taintplosion(worldObj, xCoord, yCoord, zCoord, false, 0, 2.0F, 4, 20);
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
}
}
示例4: registerItems_do
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
private static void registerItems_do() {
addAspectsDivSigil();
addAspectRecipe(ExtraUtils.unstableIngot, Aspect.METAL, 4, Aspect.ELDRITCH, 4, Aspect.ENERGY, 16);
addAspectRecipe(ExtraUtils.cursedEarth, Aspect.EARTH, 1, Aspect.DARKNESS, 1, Aspect.UNDEAD, 4, Aspect.ELDRITCH, 1, Aspect.EXCHANGE, 1);
addAspectRecipe((Block)ExtraUtils.enderLily, Aspect.DARKNESS, 1, Items.wheat_seeds, Items.ender_pearl, Aspect.ELDRITCH, 16);
addAspectRecipe(ExtraUtils.transferPipe, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }, Aspect.TRAVEL, 1, Aspect.ORDER, 1, Aspect.EARTH, 1);
addAspectRecipe(ExtraUtils.buildersWand, Aspect.TOOL, 4, Blocks.obsidian, Aspect.ELDRITCH, 4);
addAspectRecipe(ExtraUtils.buildersWand, 32767, Aspect.TOOL, 4, Blocks.obsidian, Aspect.ELDRITCH, 4, Items.nether_star);
addAspectRecipe(ExtraUtils.trashCan, Aspect.VOID, 8, Blocks.cobblestone, Aspect.ENTROPY, 4);
if (ExtraUtils.spike != null) {
addAspectRecipe(ExtraUtils.spike.itemSpike, -1, null, Aspect.WEAPON, 18, Aspect.METAL, 14);
}
if (ExtraUtils.spikeDiamond != null) {
addAspectRecipe(ExtraUtils.spikeDiamond.itemSpike, -1, null, Aspect.WEAPON, 18, Aspect.METAL, 14);
}
if (ExtraUtils.spikeGold != null) {
addAspectRecipe(ExtraUtils.spikeGold.itemSpike, -1, null, Aspect.WEAPON, 18, Aspect.METAL, 14);
}
if (ExtraUtils.spikeWood != null) {
addAspectRecipe(ExtraUtils.spikeWood.itemSpike, -1, null, Aspect.WEAPON, 18, Aspect.METAL, 14);
}
addAspectRecipe(ExtraUtils.wateringCan, -1, new ItemStack((Item)ExtraUtils.wateringCan, 1, 1), Aspect.WATER, 1, Aspect.LIFE, 1, Aspect.EARTH, 2);
addAspectRecipe(ExtraUtils.conveyor, -1, null, Blocks.rail, Aspect.TRAVEL, 4);
if (ExtraUtils.decorative1 != null) {
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 4), Blocks.stonebrick);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 7), Blocks.stonebrick);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 0), Blocks.stonebrick);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 1), Blocks.obsidian, Items.ender_pearl);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 2), Blocks.quartz_block, Aspect.FIRE, 4);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 3), Blocks.stone, Blocks.ice);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 6), Blocks.gravel);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 10), Blocks.gravel, Blocks.gravel, Aspect.TRAVEL, 1);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 9), Blocks.sand, Blocks.glass);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 13), Blocks.sand, Blocks.end_stone);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 14), Blocks.stonebrick, Aspect.SENSES, 2, Aspect.ELDRITCH, 2);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 8), null, Aspect.MAGIC, 16, Aspect.METAL, 4, Aspect.GREED, 4, Aspect.MIND, 8, Aspect.TREE, 8);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 11), null, Aspect.ELDRITCH, 16);
}
if (ExtraUtils.decorative2 != null) {
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative2, 1, 10), Aspect.CRYSTAL, 2, Aspect.DARKNESS, 4);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative2, 1, 0), Aspect.CRYSTAL, 2);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative2, 1, 3), Aspect.CRYSTAL, 2, Aspect.ENTROPY, 1);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative2, 1, 3), Aspect.CRYSTAL, 2, Aspect.ENTROPY, 1);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative2, 1, 4), Aspect.CRYSTAL, 2, Aspect.GREED, 1);
addAspectRecipe(new ItemStack((Block)ExtraUtils.decorative2, 1, 8), Aspect.CRYSTAL, 2, Aspect.LIFE, 1, Aspect.HEAL, 1);
}
for (final BlockColor colorblock : ExtraUtils.colorblocks) {
final AspectList aspectList = new AspectList(new ItemStack(colorblock.baseBlock, 1));
if (aspectList.visSize() > 0) {
for (int i = 0; i < 16; ++i) {
addAspectRecipe(new ItemStack((Block)colorblock, 1, i), aspectList, Aspect.SENSES, 1);
}
}
}
addAspectRecipe(ExtraUtils.lawSword, Aspect.WEAPON, 64, Aspect.LIFE, 32, Aspect.MAGIC, 16);
}