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


Java Thaumcraft类代码示例

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


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

示例1: handleVortexDiggingEffects

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
private static void handleVortexDiggingEffects(World currentRenderWorld) {
    Iterator<VortexDigInfo> it = vortexDigInfos.iterator();
    while(it.hasNext()) {
        VortexDigInfo info = it.next();
        if(info.dimId != currentRenderWorld.provider.dimensionId) {
            it.remove();
            continue;
        }
        info.renderTicks++;
        if(info.renderTicks > info.tickCap) {
            it.remove();
            continue;
        }

        Thaumcraft.proxy.boreDigFx(currentRenderWorld, info.tX, info.tY, info.tZ, info.oX, info.oY, info.oZ, info.blockInstance, info.meta);
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:18,代码来源:MultiTickEffectDispatcher.java

示例2: receiveClientEvent

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
public boolean receiveClientEvent(int i, int j) {
    if (i == 9) {
        if (this.worldObj.isRemote) {
            for (int yy = -1; yy < 3; yy++) {
                for (int xx = -1; xx < 2; xx++) {
                    for (int zz = -1; zz < 2; zz++) {
                        Thaumcraft.proxy.blockSparkle(this.worldObj, this.xCoord + xx, this.yCoord + yy, this.zCoord + zz, -9999, 5);
                    }
                }
            }
            this.animate = (System.currentTimeMillis() + 1000L);
        }
        return true;
    }
    return super.receiveClientEvent(i, j);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:17,代码来源:TileExtendedNodeJar.java

示例3: spawnEntityParticles

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
private void spawnEntityParticles(EntityLivingBase entity) {
    AxisAlignedBB cube = entity.boundingBox;
    if(cube != null && worldObj.rand.nextInt(20) == 0) {
        double posX = worldObj.rand.nextDouble() * (cube.maxX - cube.minX) + cube.minX;
        double posY = worldObj.rand.nextDouble() * (cube.maxX - cube.minX) + cube.minY;
        double posZ = worldObj.rand.nextDouble() * (cube.maxX - cube.minX) + cube.minZ;

        switch (worldObj.rand.nextInt(5)) {
            case 0: posX = cube.maxX; break;
            case 1: posY = cube.maxY; break;
            case 2: posZ = cube.maxZ; break;
            case 3: posX = cube.minX; break;
            case 4: posZ = cube.minZ; break;
        }

        Thaumcraft.proxy.wispFX3(this.worldObj, posX, posY, posZ, posX + this.worldObj.rand.nextFloat() * 0.2F, posY, posZ + this.worldObj.rand.nextFloat() * 0.2F, 0.2F, 6, true, -0.02F);
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:19,代码来源:TileBlockProtector.java

示例4: playVortexEffects

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
private void playVortexEffects() {
    for (int a = 0; a < Thaumcraft.proxy.particleCount(1); a++) {
        int tx = this.xCoord + this.worldObj.rand.nextInt(4) - this.worldObj.rand.nextInt(4);
        int ty = this.yCoord + 1 + this.worldObj.rand.nextInt(4) - this.worldObj.rand.nextInt(4);
        int tz = this.zCoord + this.worldObj.rand.nextInt(4) - this.worldObj.rand.nextInt(4);
        if (ty > this.worldObj.getHeightValue(tx, tz)) {
            ty = this.worldObj.getHeightValue(tx, tz);
        }
        Vec3 v1 = Vec3.createVectorHelper(this.xCoord + 0.5D, this.yCoord + 1.5D, this.zCoord + 0.5D);
        Vec3 v2 = Vec3.createVectorHelper(tx + 0.5D, ty + 0.5D, tz + 0.5D);

        MovingObjectPosition mop = ThaumcraftApiHelper.rayTraceIgnoringSource(this.worldObj, v1, v2, true, false, false);
        if ((mop != null) && (getDistanceFrom(mop.blockX, mop.blockY, mop.blockZ) < 16.0D)) {
            tx = mop.blockX;
            ty = mop.blockY;
            tz = mop.blockZ;
            Block bi = this.worldObj.getBlock(tx, ty, tz);
            int md = this.worldObj.getBlockMetadata(tx, ty, tz);
            if (!bi.isAir(this.worldObj, tx, ty, tz)) {
                Thaumcraft.proxy.hungryNodeFX(this.worldObj, tx, ty, tz, this.xCoord, this.yCoord + 1, this.zCoord, bi, md);
            }
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:25,代码来源:TileEssentiaCompressor.java

示例5: registerItems

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
private static void registerItems() {
    itemTransformationFocus = registerItem(new ItemTransformationFocus());
    itemGolemCoreBreak = registerItem(new ItemGolemCoreBreak());
    itemFamiliar_old = registerItem(new ItemFamiliar_Old(), "ItemFamiliar");
    itemEtherealFamiliar = registerItem(new ItemEtherealFamiliar());
    itemAuraCore = registerItem(new ItemAuraCore());
    itemElement = registerItem(new ItemElement());

    itemCreativeNode = registerItem(new ItemCreativeNode());
    itemPackage = registerItem(new ItemArcanePackage());
    itemFakeLootbag = registerItem(Thaumcraft.MODID, new ItemFakeLootbag());
    itemFakeGolemPlacer = registerItem(new ItemFakeGolemPlacer());
    itemFakeGolemShield = registerItem(new ItemFakeGolemShield());
    itemExtendedNodeJar = registerItem(new ItemExtendedNodeJar());
    itemFakeModIcon = registerItem(new ItemFakeModIcon());
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:17,代码来源:RegisteredItems.java

示例6: addInformation

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
    String desc = "§9" + StatCollector.translateToLocal("nodetype." + getNodeType(stack) + ".name");
    if(getExtendedNodeType(stack) != null) {
        desc = desc + ", " + StatCollector.translateToLocal("gadomancy.nodes." + getExtendedNodeType(stack));
    }
    if (getNodeModifier(stack) != null) {
        desc = desc + ", " + StatCollector.translateToLocal("nodemod." + getNodeModifier(stack) + ".name");
    }
    list.add(desc);
    AspectList aspects = getAspects(stack);
    if ((aspects != null) && (aspects.size() > 0)) {
        for (Aspect tag : aspects.getAspectsSorted()) {
            if (Thaumcraft.proxy.playerKnowledge.hasDiscoveredAspect(player.getCommandSenderName(), tag)) {
                list.add(tag.getName() + " x " + aspects.getAmount(tag));
            } else {
                list.add(StatCollector.translateToLocal("tc.aspect.unknown"));
            }
        }
    }
    super.addInformation(stack, player, list, par4);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:23,代码来源:ItemExtendedNodeJar.java

示例7: doParticalFX

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
/**
 * Shows runes on the infusion provider.
 *
 * @param aspectColor
 */
private void doParticalFX( final int aspectColor )
{
	// Convert each color to percentage
	float red = ( aspectColor & 0xFF0000 ) / (float)0xFF0000;
	float green = ( aspectColor & 0x00FF00 ) / (float)0x00FF00;
	float blue = ( aspectColor & 0x0000FF ) / (float)0x0000FF;

	// Add particles
	for( int i = 0; i < 5; i++ )
	{
		Thaumcraft.proxy.blockRunes( this.worldObj, this.xCoord, this.yCoord, this.zCoord, red, green, blue, 15, -0.1F );
	}
	for( int i = 0; i < 5; i++ )
	{
		Thaumcraft.proxy.blockRunes( this.worldObj, this.xCoord, this.yCoord, this.zCoord, red, green, blue, 15, 0.1F );
	}
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:23,代码来源:TileInfusionProvider.java

示例8: onItemRightClick

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
    if (Config.researchDifficulty != -1 && stack.getItemDamage() >= 100) {
        if (!world.isRemote) {
            Aspect aspect;
            short amount;
            for(Iterator count = Aspect.getPrimalAspects().iterator(); count.hasNext(); PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspect.getTag(), Short.valueOf(amount), Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP)player))
            {
                aspect = (Aspect)count.next();
                amount = (short)(world.rand.nextInt(4) + 4);
                Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, amount);
                ResearchManager.scheduleSave(player);
            }
        }
        player.swingItem();
        return new ItemStack(ConfigItems.itemInkwell, 1, 100);
    } else
        return stack;
}
 
开发者ID:SpitefulFox,项目名称:ForbiddenMagic,代码行数:20,代码来源:ItemCrystalwell.java

示例9: onUpdate

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isSelected) {

    if(world.isRemote)
        return;
    if(Config.researchDifficulty == -1 && entity.ticksExisted % 200 == 0 && (entity instanceof EntityPlayer)){
        EntityPlayer player = (EntityPlayer)entity;
        Aspect aspect = (Aspect)Aspect.getPrimalAspects().get(world.rand.nextInt(6));
        short amount = (short)(world.rand.nextInt(4) + 1);
        Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, amount);
        PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspect.getTag(), amount, Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP) player);
        ResearchManager.scheduleSave(player);
        stack.setItemDamage(stack.getItemDamage() + 1);
        if(stack.getItemDamage() >= stack.getMaxDamage())
            ((EntityPlayer)entity).inventory.setInventorySlotContents(slot, null);
    }
}
 
开发者ID:SpitefulFox,项目名称:ForbiddenMagic,代码行数:18,代码来源:ItemCrystalwell.java

示例10: onUpdate

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
@Override
public void onUpdate(){
    super.onUpdate();

    if(redstoneSignal > 0)
        return;

    if(mana >= cost && !supertile.getWorldObj().isRemote && this.ticksExisted % 400 == 0) {
        Thaumcraft.proxy.burst(supertile.getWorldObj(), (double)supertile.xCoord + 0.5D, (double)supertile.yCoord + 0.5D, (double)supertile.zCoord + 0.5D, 1.0F);
        AspectList aspect;
        if(supertile.getWorldObj().rand.nextInt(10) < 4)
            aspect = (new AspectList()).add(Aspect.AURA, 2);
        else {
            Aspect[] aspects = Aspect.aspects.values().toArray(new Aspect[0]);
            aspect = (new AspectList()).add(aspects[supertile.getWorldObj().rand.nextInt(aspects.length)], 2);
        }
        ItemStack ess = new ItemStack(ConfigItems.itemWispEssence);
        ((ItemWispEssence)ess.getItem()).setAspects(ess, aspect);
        dropItem(supertile.getWorldObj(), supertile.xCoord, supertile.yCoord, supertile.zCoord, ess);
        mana -= cost;
        sync();
    }
}
 
开发者ID:SpitefulFox,项目名称:ForbiddenMagic,代码行数:24,代码来源:SubTileEuclidaisy.java

示例11: onEntityUpdate

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
@SubscribeEvent
public void onEntityUpdate(LivingEvent.LivingUpdateEvent e) {
    //POTION EFFECT
    //For poison immunity poison
    EntityLivingBase entity = e.entityLiving;
    if (entity.isPotionActive(ModPotions.poisonImmunity) && entity.isPotionActive(Potion.poison)) {
        entity.removePotionEffect(Potion.poison.getId());
    }

    if (entity instanceof EntityPlayer) {
        EntityPlayer player = (EntityPlayer) entity;
        World world = player.worldObj;

        //Purifying effect of crystal armor
        if (ArmorSetUtils.isWearingArmorOfType(player, ItemPrysmalArmor.class) && !world.isRemote &&
            world.rand.nextInt(1000) <= ArmorSetUtils.getNumDonnedArmor(player, ItemPrysmalArmor.class, null)) {
            ThaumcraftApiHelper.addStickyWarpToPlayer(player, -1);
        }

        //Warp compounding effect from being in Xth'uoth
        int totalWarp = Thaumcraft.proxy.getPlayerKnowledge().getWarpTotal(player.getCommandSenderName());
        if (player.dimension == ConfigHandler.DIM_ID && !world.isRemote && world.rand.nextInt(8000) <= totalWarp) {
            ThaumcraftApiHelper.addStickyWarpToPlayer(player, 1);
        }
    }
}
 
开发者ID:Aurilux,项目名称:Xth-uoth,代码行数:27,代码来源:EntityHandler.java

示例12: set

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
@Override
protected boolean set(EntityPlayer dataHolder, Map<WarpType, Integer> value) {
    int normal = value.get(WarpTypes.NORMAL);
    int temporary = value.get(WarpTypes.TEMPORARY);
    int permanent = value.get(WarpTypes.PERMANENT);
    Thaumcraft.proxy.getPlayerKnowledge().setWarpSticky(dataHolder.getName(), normal);
    Thaumcraft.proxy.getPlayerKnowledge().setWarpTemp(dataHolder.getName(), temporary);
    Thaumcraft.proxy.getPlayerKnowledge().setWarpPerm(dataHolder.getName(), permanent);
    Thaumcraft.proxy.getPlayerKnowledge().setWarpCounter(dataHolder.getName(), Thaumcraft.proxy.getPlayerKnowledge().getWarpTotal(dataHolder.getName()));
    return true;
}
 
开发者ID:gabizou,项目名称:ThaumicSponge,代码行数:12,代码来源:PlayerWarpDataProcessor.java

示例13: getVal

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
@Override
protected Optional<Map<WarpType, Integer>> getVal(EntityPlayer dataHolder) {
    Map<WarpType, Integer> map = new HashMap<>(3);
    map.put(WarpTypes.NORMAL, Thaumcraft.proxy.getPlayerKnowledge().getWarpSticky(dataHolder.getName()));
    map.put(WarpTypes.TEMPORARY, Thaumcraft.proxy.getPlayerKnowledge().getWarpTemp(dataHolder.getName()));
    map.put(WarpTypes.PERMANENT, Thaumcraft.proxy.getPlayerKnowledge().getWarpPerm(dataHolder.getName()));
    return Optional.of(map);
}
 
开发者ID:gabizou,项目名称:ThaumicSponge,代码行数:9,代码来源:PlayerWarpDataProcessor.java

示例14: BlockExtraLifter

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
public BlockExtraLifter()
{
    super(Material.wood, "blockExtraLifter");
    this.setTextures("thaumcraft:arcaneearbottom", "thaumcraft:liftertop", "thaumcraft:lifterside", "thaumcraft:animatedglow");
    this.setHardness(2.5F);
    this.setResistance(15.0F);
    this.setStepSound(soundTypeWood);
    this.setCreativeTab(Thaumcraft.tabTC);
}
 
开发者ID:Thog,项目名称:ThaumicThings,代码行数:10,代码来源:BlockExtraLifter.java

示例15: ItemBottleEthereal

import thaumcraft.common.Thaumcraft; //导入依赖的package包/类
public ItemBottleEthereal()
{
    this.maxStackSize = 8;
    this.setMaxDamage(0);
    this.setCreativeTab(Thaumcraft.tabTC);
    this.setHasSubtypes(false);
}
 
开发者ID:Thog,项目名称:ThaumicThings,代码行数:8,代码来源:ItemBottleEthereal.java


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