• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ConfigBlocks类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中thaumcraft.common.config.ConfigBlocks的典型用法代码示例。如果您正苦于以下问题:Java ConfigBlocks类的具体用法?Java ConfigBlocks怎么用?Java ConfigBlocks使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ConfigBlocks类属于thaumcraft.common.config包,在下文中一共展示了ConfigBlocks类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: renderNodeItem

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public static void renderNodeItem(IItemRenderer.ItemRenderType type, ItemStack item, AspectList aspects, NodeType nodeType, NodeModifier nodeModifier, Object... data) {
    if (type == IItemRenderer.ItemRenderType.ENTITY) {
        GL11.glTranslatef(-0.5F, -0.25F, -0.5F);
    } else if ((type == IItemRenderer.ItemRenderType.EQUIPPED) && ((data[1] instanceof EntityPlayer))) {
        GL11.glTranslatef(0.0F, 0.0F, -0.5F);
    }
    TileNode tjf = new TileNode();
    tjf.setAspects(aspects);
    tjf.setNodeType(nodeType);
    tjf.blockType = ConfigBlocks.blockAiry;
    tjf.blockMetadata = 0;
    GL11.glPushMatrix();
    GL11.glTranslated(0.5D, 0.5D, 0.5D);
    GL11.glScaled(2.0D, 2.0D, 2.0D);
    renderItemNode(tjf);
    GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
    renderItemNode(tjf);
    GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
    renderItemNode(tjf);
    GL11.glPopMatrix();
    GL11.glEnable(32826);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:23,代码来源:ItemNodeRenderer.java


示例2: renderInventoryBlock

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
    GL11.glPushMatrix();
    GL11.glEnable(3042);
    GL11.glBlendFunc(770, 771);
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    IIcon i1 = ((BlockJar) ConfigBlocks.blockJar).iconJarTop;
    IIcon i2 = ((BlockJar) ConfigBlocks.blockJar).iconJarSide;
    block.setBlockBounds(W3, 0.0F, W3, W13, W12, W13);
    renderer.setRenderBoundsFromBlock(block);
    drawFaces(renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
    block.setBlockBounds(W5, W12, W5, W11, W14, W11);
    renderer.setRenderBoundsFromBlock(block);
    drawFaces(renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
    GL11.glPopMatrix();
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:17,代码来源:BlockExtendedNodeJarRenderer.java


示例3: doInit

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@Override
protected void doInit() {
    Block infinityJar = Block.getBlockFromName("Automagy:blockCreativeJar");
    if(infinityJar != null) {
        RegisteredBlocks.registerStickyJar(infinityJar, 3, false, true);
        RegisteredItems.registerStickyJar(Item.getItemFromBlock(infinityJar), 3);
    }

    if(ModConfig.enableAdditionalNodeTypes) {
        CommonProxy.unregisterWandHandler("Automagy", ConfigBlocks.blockWarded, -1);
    }

    //Better bookshelves -> MOAR knowledge
    Block betterBookshelf = Block.getBlockFromName("Automagy:blockBookshelfEnchanted");
    if(betterBookshelf != null) {
        TileKnowledgeBook.knowledgeIncreaseMap.put(new TileKnowledgeBook.BlockSnapshot(betterBookshelf, 0), 2);
        TileKnowledgeBook.knowledgeIncreaseMap.put(new TileKnowledgeBook.BlockSnapshot(betterBookshelf, 1), 4);
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:20,代码来源:IntegrationAutomagy.java


示例4: taintplosion

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public static void taintplosion(World world, int x, int y, int z, boolean taintBiome, int chanceToTaint, float str, int size, int blocksAffected) {
    if(chanceToTaint < 1) chanceToTaint = 1;
    world.createExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, str, false);
    for (int a = 0; a < blocksAffected; a++) {
        int xx = x + world.rand.nextInt(size) - world.rand.nextInt(size);
        int yy = y + world.rand.nextInt(size) - world.rand.nextInt(size);
        int zz = z + world.rand.nextInt(size) - world.rand.nextInt(size);
        if (world.isAirBlock(xx, yy, zz)) {
            if (yy < y) {
                world.setBlock(xx, yy, zz, ConfigBlocks.blockFluxGoo, 8, 3);
            } else {
                world.setBlock(xx, yy, zz, ConfigBlocks.blockFluxGas, 8, 3);
            }
        }
        if(!Config.genTaint) continue;

        if(taintBiome && world.rand.nextInt(chanceToTaint) == 0) {
            Utils.setBiomeAt(world, xx, zz, ThaumcraftWorldGenerator.biomeTaint);
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:22,代码来源:ExplosionHelper.java


示例5: handleWandInteract

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public static void handleWandInteract(World world, int x, int y, int z, EntityPlayer entityPlayer, ItemStack i) {
    Block target = world.getBlock(x, y, z);
    if(target == null) return;

    if(ModConfig.enableAdditionalNodeTypes) {
        if (target.equals(Blocks.glass)) {
            if (ResearchManager.isResearchComplete(entityPlayer.getCommandSenderName(), "NODEJAR")) {
                tryTCJarNodeCreation(i, entityPlayer, world, x, y, z);
            }
        } else if (target.equals(ConfigBlocks.blockWarded)) {
            if (RegisteredIntegrations.automagy.isPresent() &&
                    ResearchManager.isResearchComplete(entityPlayer.getCommandSenderName(), "ADVNODEJAR")) {
                tryAutomagyJarNodeCreation(i, entityPlayer, world, x, y, z);
            }
        }
    }

    if(target.equals(ConfigBlocks.blockCrystal)) {
        if (ResearchManager.isResearchComplete(entityPlayer.getCommandSenderName(), Gadomancy.MODID.toUpperCase() + ".AURA_CORE"))
            tryAuraCoreCreation(i, entityPlayer, world, x, y, z);
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:23,代码来源:WandHandler.java


示例6: onBlockActivated

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
    int metadata = world.getBlockMetadata(x, y, z);

    if (metadata == 0 || metadata == 3) {
        if (world.getBlock(x, y - 1, z).equals(RegisteredBlocks.blockNodeManipulator) && world.getBlockMetadata(x, y - 1, z) == 5) {
            return world.getBlock(x, y - 1, z).onBlockActivated(world, x, y - 1, z, player, side, hitX, hitY, hitZ);
        }
    } else if (metadata == 1) {
        if(world.isAirBlock(x, y + 1, z)) {
            return ConfigBlocks.blockStoneDevice.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
        }
        return true;
    } else if(metadata == 4) {
        player.openGui(Gadomancy.instance, 2, world, x, y, z);
        return true;
    }

    return super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:21,代码来源:BlockStoneMachine.java


示例7: onWandRightClick

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public int onWandRightClick(World world, ItemStack wandstack, EntityPlayer player, int x, int y, int z, int side, int md) {
    if (!world.isRemote) {
        this.drop = false;
        world.setBlock(x, y, z, ConfigBlocks.blockAiry, 0, 3);
        TileExtendedNode tn = (TileExtendedNode) world.getTileEntity(x, y, z);
        if (tn != null) {
            tn.setAspects(getAspects());
            tn.setNodeModifier(getNodeModifier());
            tn.setNodeType(getNodeType());
            tn.setExtendedNodeType(getExtendedNodeType());
            new Injector(tn, TileNode.class).setField("id", getId());
            tn.readBehaviorSnapshot(getBehaviorSnapshot());
            world.markBlockForUpdate(x, y, z);
            tn.markDirty();
        }
    }
    world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(ConfigBlocks.blockJar) + 61440);
    player.worldObj.playSound(x + 0.5D, y + 0.5D, z + 0.5D, "random.glass", 1.0F, 0.9F + player.worldObj.rand.nextFloat() * 0.2F, false);
    player.swingItem();
    return 0;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:22,代码来源:TileExtendedNodeJar.java


示例8: preInit

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public static void preInit() {
        if(ModConfig.enableAdditionalNodeTypes) {
            try {
                ItemBlock item = (ItemBlock) Item.getItemFromBlock(ConfigBlocks.blockAiry);

                item.field_150939_a = RegisteredBlocks.blockNode;

                //Hacky way
                FMLControlledNamespacedRegistry<Block> registry = GameData.getBlockRegistry();
                registry.underlyingIntegerMap.field_148749_a.put(RegisteredBlocks.blockNode, Block.getIdFromBlock(ConfigBlocks.blockAiry));
                registry.underlyingIntegerMap.field_148748_b.set(Block.getIdFromBlock(ConfigBlocks.blockAiry), RegisteredBlocks.blockNode);
                ((BiMap)registry.field_148758_b).forcePut(RegisteredBlocks.blockNode, registry.field_148758_b.get(ConfigBlocks.blockAiry));

                registry.underlyingIntegerMap.field_148749_a.remove(ConfigBlocks.blockAiry);

                ConfigBlocks.blockAiry = RegisteredBlocks.blockNode;
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:22,代码来源:ModSubstitutions.java


示例9: onBreak

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@SubscribeEvent
public void onBreak(BlockEvent.BreakEvent event) {
    if (!event.world.isRemote) {
        if (event.block == RegisteredBlocks.blockNodeManipulator) {
            TileEntity te = event.world.getTileEntity(event.x, event.y, event.z);
            if (te != null && te instanceof TileNodeManipulator) {
                if (((TileNodeManipulator) te).isInMultiblock())
                    ((TileNodeManipulator) te).breakMultiblock();
            }
        }
        if (event.block == RegisteredBlocks.blockStoneMachine && event.blockMetadata == 5) {
            TileAIShutdown.removeTrackedEntities(event.world, event.x, event.y, event.z);
        }
        if (event.world.provider.dimensionId == ModConfig.dimOuterId) {
            if(event.block == ConfigBlocks.blockEldritchNothing) {
                if(event.getPlayer().capabilities.isCreativeMode && MiscUtils.isANotApprovedOrMisunderstoodPersonFromMoreDoor(event.getPlayer())) return;
                event.setCanceled(true);
                event.getPlayer().addChatMessage(new ChatComponentText(EnumChatFormatting.ITALIC + "" + EnumChatFormatting.GRAY + StatCollector.translateToLocal("gadomancy.eldritch.nobreakPortalNothing")));
            }
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:23,代码来源:EventHandlerWorld.java


示例10: initThaumic

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public static void initThaumic() {

        recipeQuartz = ThaumcraftApi.addCrucibleRecipe(ResearchLib.QUARTZ_KEY, new ItemStack(ModItems.itemResource, 1, 2), new ItemStack(Items.quartz), new AspectList().add(Aspect.MAGIC, 4).add(Aspect.ELDRITCH, 4));
        recipeCrystal = ThaumcraftApi.addCrucibleRecipe(ResearchLib.CRYSTAL_KEY, new ItemStack(ModItems.itemResource, 1, 1), new ItemStack(ModItems.itemResource, 1, 0), new AspectList().add(Aspect.MAGIC, 32).add(Aspect.CRYSTAL, 32));

        recipeWardenHelm = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenHelm, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
                "XXX", "XOX", "   ", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
        recipeWardenChest = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenChest, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
                "X X", "XOX", "XXX", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
        recipeWardenLegs = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenLegs, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
                "XXX", "XOX", "X X", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
        recipeWardenBoots = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenBoots, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
                "   ", "XOX", "X X", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
        recipeWardenSword = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_WEAPON_KEY, new ItemStack(ModItems.itemWardenSword, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
                " X ", " X ", " O ", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));

        recipeWaslieHammer = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WASLIE_HAMMER_KEY, new ItemStack(ModItems.itemWaslieHammer, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
                "XXX", "XOX", " I ", 'X', new ItemStack(ModItems.itemResource, 1, 1), 'O', new ItemStack(ModItems.itemResource, 1, 2), 'I', new ItemStack(ConfigBlocks.blockMagicalLog));

        recipeFocusIllumination = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.FOCUS_ILLUMINATION_KEY, new ItemStack(ModItems.itemFocusIllumination, 1), new AspectList().add(Aspect.AIR, 50).add(Aspect.FIRE, 50),
                " X ", "XOX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 1), 'O', new ItemStack(ConfigItems.itemFocusFire));

    }
 
开发者ID:MasterAbdoTGM50,项目名称:ThaumicWarden,代码行数:24,代码来源:ModRecipes.java


示例11: handleBossFinish

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public static void handleBossFinish(TCMazeSession session) {
    CellLoc spawnChunk = session.portalCell;
    WorldServer world = MinecraftServer.getServer().worldServerForDimension(ModConfig.dimOuterId);
    int lX = (spawnChunk.x << 4) + 8;
    int lZ = (spawnChunk.z << 4) + 8;
    world.setBlock(lX, 52, lZ, ConfigBlocks.blockEldritch, 3, 3);
    world.setBlock(lX, 53, lZ, RegisteredBlocks.blockAdditionalEldrichPortal);
    GenCommon.genObelisk(world, lX, 54, lZ);
    session.player.addChatMessage(new ChatComponentText(EnumChatFormatting.ITALIC + "" + EnumChatFormatting.GRAY + StatCollector.translateToLocal("gadomancy.eldritch.portalSpawned")));
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:11,代码来源:TCMazeHandler.java


示例12: setBlock

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@Override
public boolean setBlock(int x, int y, int z, Block block, int meta, int flags) {
    if(block == ConfigBlocks.blockEldritchPortal) return true;
    if(block == ConfigBlocks.blockEldritch && (meta == 1 || meta == 2 || meta == 3)) return true;

    blockCount++;

    long chKey = ((long) x >> 4) | ((long) z >> 4) << 32;
    ChunkBuffer buf = chunks.get(chKey);
    int keyX = (x & 15) << 7 << 4;
    int keyZ = (z & 15) << 7;
    int key = keyX | keyZ | y;

    if(buf.blockData[key] != null) {
        blockOverwriteCount++;
        ChunkCoordinates cc = new ChunkCoordinates(x, y, z);
        if(gettedTE.containsKey(cc)) {
            gettedTE.remove(cc);
        }
    }

    /*if(block == ConfigBlocks.blockEldritchNothing) {
        if(BlockUtils.isBlockExposed(this, x, y, z)) {
            meta = 1;
        }
    }*/

    buf.blockData[key] = block;
    buf.metaBuffer[key] = (byte) meta;
    if(block.hasTileEntity(meta)) buf.tiles.add(new Integer[] {x, y, z, key});
    return true;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:33,代码来源:FakeWorldTCGeneration.java


示例13: onNeighborBlockChange

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
    if(world.isRemote) return;
    Block lower = world.getBlock(x, y - 1, z);
    int metaLower = world.getBlockMetadata(x, y - 1, z);
    if(!lower.equals(ConfigBlocks.blockStoneDevice) || metaLower != 1) {
        breakThisBlock(world, x, y, z);
    }
    if(!world.isAirBlock(x, y + 1, z)) {
        breakThisBlock(world, x, y, z);
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:13,代码来源:BlockKnowledgeBook.java


示例14: getItemDropped

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@Override
public Item getItemDropped(int metadata, Random random, int fortune) {
    if (metadata == 11 || metadata == 15) {
        return Item.getItemFromBlock(ConfigBlocks.blockCosmeticSolid);
    }

    return super.getItemDropped(metadata, random, fortune);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:9,代码来源:BlockStoneMachine.java


示例15: createAuraCoreRecipes

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
private static List[] createAuraCoreRecipes() {
    List[] recipes = new List[7];
    for(int i = 0; i < 7; i++) {
        AspectList cost = new AspectList();
        switch (i) {
            case 0: cost.add(Aspect.AIR, 84); break;
            case 1: cost.add(Aspect.FIRE, 84); break;
            case 2: cost.add(Aspect.WATER, 84); break;
            case 3: cost.add(Aspect.EARTH, 84); break;
            case 4: cost.add(Aspect.ORDER, 84); break;
            case 5: cost.add(Aspect.ENTROPY, 84); break;
            case 6: cost.add(Aspect.AIR, 14).add(Aspect.FIRE, 14).add(Aspect.WATER, 14)
                    .add(Aspect.EARTH, 14).add(Aspect.ORDER, 14).add(Aspect.ENTROPY, 14);
        }

        ItemWandCasting item = (ItemWandCasting) ConfigItems.itemWandCasting;
        ItemStack wand = new ItemStack(item);
        item.setRod(wand, ConfigItems.WAND_ROD_GREATWOOD);
        item.setCap(wand, ConfigItems.WAND_CAP_GOLD);

        recipes[i] = Arrays.asList(cost, 3, 2, 3,
                Arrays.asList(
                        null, null, null, null, wand, null, null, null, null,
                        null, null, null, null, new ItemStack(ConfigBlocks.blockCrystal, 1, i),
                        new ItemStack(RegisteredItems.itemAuraCore), null, null, null
                ));
    }
    return recipes;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:30,代码来源:RegisteredRecipes.java


示例16: registerBlocks

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
private static void registerBlocks() {
    blockStickyJar = registerBlock(new BlockStickyJar());
    blockArcaneDropper = registerBlock(new BlockArcaneDropper());
    blockInfusionClaw = registerBlock(new BlockInfusionClaw());
    blockRemoteJar = registerBlock(new BlockRemoteJar(), ItemBlockRemoteJar.class);
    blockNode = ModConfig.enableAdditionalNodeTypes ? (BlockAiry) new BlockNode().setBlockName("blockAiry") : (BlockAiry) ConfigBlocks.blockAiry;
    blockExtendedNodeJar = registerBlock(new BlockExtendedNodeJar());
    blockNodeManipulator = registerBlock(new BlockNodeManipulator(), ItemNodeManipulator.class);
    blockStoneMachine = registerBlock(new BlockStoneMachine(), ItemBlockStoneMachine.class);
    blockAdditionalEldrichPortal = registerBlock(new BlockAdditionalEldritchPortal(), ItemBlockAdditionalEldritchPortal.class);
    blockAuraPylon = registerBlock(new BlockAuraPylon(), ItemBlockAuraPylon.class);
    blockKnowledgeBook = registerBlock(new BlockKnowledgeBook(), ItemBlockKnowledgeBook.class);
    blockEssentiaCompressor = registerBlock(new BlockEssentiaCompressor(), ItemBlockEssentiaCompressor.class);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:15,代码来源:RegisteredBlocks.java


示例17: registerDefaultStickyJars

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
private static void registerDefaultStickyJars() {
    registerStickyJar(ConfigItems.itemJarFilled, 0);
    registerStickyJar(ConfigItems.itemJarFilled, 3);

    Item itemBlockJar = Item.getItemFromBlock(ConfigBlocks.blockJar);
    registerStickyJar(itemBlockJar, 0, new ItemStack(itemBlockJar, 1, 0), "JARLABEL");
    registerStickyJar(itemBlockJar, 3, new ItemStack(itemBlockJar, 1, 3), "JARVOID");

    Item itemRemoteJar = Item.getItemFromBlock(RegisteredBlocks.blockRemoteJar);
    registerStickyJar(itemRemoteJar, 0, new ItemStack(itemRemoteJar), SimpleResearchItem.getFullName("REMOTEJAR"));
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:12,代码来源:RegisteredItems.java


示例18: onItemUse

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
    ForgeDirection placedAgainstDir = ForgeDirection.getOrientation(side);
    Block placedAgainst = world.getBlock(x, y, z);
    int againstMeta = world.getBlockMetadata(x, y, z);
    if(placedAgainstDir.equals(ForgeDirection.UP) && placedAgainst.equals(ConfigBlocks.blockStoneDevice) && againstMeta == 1) {
        if(world.isAirBlock(x, y + 2, z)) {
            return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
        } else {
            return false;
        }
    } else {
        return false;
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:16,代码来源:ItemBlockKnowledgeBook.java


示例19: placeRandomNode

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
private boolean placeRandomNode(World world, int x, int y, int z) {
    if(world.getBlock(x, y, z) == Blocks.air) {
        ThaumcraftWorldGenerator.createRandomNodeAt(world, x, y, z, world.rand, false, false, false);
        return world.getBlock(x, y, z) == ConfigBlocks.blockAiry;
    }
    return false;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:8,代码来源:ItemCreativeNode.java


示例20: GuiButtonAllowVoid

import thaumcraft.common.config.ConfigBlocks; //导入依赖的package包/类
public GuiButtonAllowVoid( final int ID, final int xPosition, final int yPosition )
{
	super( ID, xPosition, yPosition, GuiButtonAllowVoid.BUTTON_SIZE, GuiButtonAllowVoid.BUTTON_SIZE, "" );

	// Ensure we have made the void jar stack
	if( GuiButtonAllowVoid.voidJar == null )
	{
		GuiButtonAllowVoid.voidJar = new ItemStack( ConfigBlocks.blockJar, 1, 3 );
	}
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:11,代码来源:GuiButtonAllowVoid.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AstVisitor类代码示例发布时间:2022-05-23
下一篇:
Java DefaultPlace类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap