本文整理汇总了Java中thaumcraft.common.config.ConfigItems类的典型用法代码示例。如果您正苦于以下问题:Java ConfigItems类的具体用法?Java ConfigItems怎么用?Java ConfigItems使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConfigItems类属于thaumcraft.common.config包,在下文中一共展示了ConfigItems类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initThaumic
import thaumcraft.common.config.ConfigItems; //导入依赖的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
示例2: renderItem
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@Override
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack stack, Object... data) {
GL11.glEnable(GL11.GL_ALPHA_TEST);
AspectList aspects = ((ItemJarFilled)ConfigItems.itemJarFilled).getAspects(stack);
if(aspects != null) {
tile.aspect = aspects.getAspects()[0];
tile.amount = aspects.getAmount(tile.aspect);
} else {
tile.aspect = null;
tile.amount = 0;
}
if(stack.hasTagCompound()) {
tile.networkId = NBTHelper.getUUID(stack.getTagCompound(), "networkId");
}
super.renderItem(type, stack, data);
GL11.glPushMatrix();
GL11.glTranslatef(0.5f, 0.5f, 0.5f);
RenderingRegistry.instance().renderInventoryBlock(RenderBlocks.getInstance(), RegisteredBlocks.blockRemoteJar, 0, RegisteredBlocks.blockRemoteJar.getRenderType());
GL11.glPopMatrix();
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:26,代码来源:ItemRenderRemoteJar.java
示例3: getDrops
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
ArrayList<ItemStack> drops = super.getDrops(world, x, y, z, metadata, fortune);
for(ItemStack drop : drops) {
if(drop.getItem() == ConfigItems.itemJarFilled || drop.getItem() == Item.getItemFromBlock(this)) {
drop.func_150996_a(Item.getItemFromBlock(this));
TileRemoteJar tile = getJarTile(world, x, y, z);
if(tile.networkId != null) {
NBTHelper.setUUID(NBTHelper.getData(drop), "networkId", tile.networkId);
}
}
}
return drops;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:17,代码来源:BlockRemoteJar.java
示例4: createAuraCoreRecipes
import thaumcraft.common.config.ConfigItems; //导入依赖的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
示例5: createFamiliarRecipes
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
public static InfusionRecipe[] createFamiliarRecipes() {
List<Aspect> aspects = new ArrayList<Aspect>(Aspect.aspects.values());
InfusionRecipe[] recipes = new InfusionRecipe[aspects.size()];
ItemWispEssence itemEssence = (ItemWispEssence) ConfigItems.itemWispEssence;
ItemStack result;
for (int i = 0; i < aspects.size(); i++) {
Aspect aspect = aspects.get(i);
ItemStack wispyEssence = new ItemStack(itemEssence, 1, 0);
itemEssence.setAspects(wispyEssence, new AspectList().add(aspect, 2));
result = new ItemStack(RegisteredItems.itemEtherealFamiliar);
ItemEtherealFamiliar.setFamiliarAspect(result, aspect);
recipes[i] = ThaumcraftApi.addInfusionCraftingRecipe(Gadomancy.MODID.toUpperCase() + ".ETHEREAL_FAMILIAR",
result, 4, new AspectList().add(aspect, 10).add(Aspect.AURA, 12).add(Aspect.MAGIC, 18), new ItemStack(ConfigItems.itemAmuletRunic, 1, 0),
new ItemStack[] { wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 1), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 1) });
}
return recipes;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:21,代码来源:RegisteredRecipes.java
示例6: placeBlockAt
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) {
boolean placed = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);
if (placed && stack.hasTagCompound()) {
TileRemoteJar tile = (TileRemoteJar) world.getTileEntity(x, y, z);
AspectList aspects = ((ItemJarFilled) ConfigItems.itemJarFilled).getAspects(stack);
if(aspects != null) {
tile.aspect = aspects.getAspects()[0];
tile.amount = aspects.getAmount(tile.aspect);
}
if(!world.isRemote) {
tile.networkId = NBTHelper.getUUID(stack.getTagCompound(), "networkId");
tile.markForUpdate();
}
}
return placed;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:20,代码来源:ItemBlockRemoteJar.java
示例7: createFilledPhial
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
/**
* Returns an itemstack with a single filled phial.
*
* @param aspect
* @return
*/
public ItemStack createFilledPhial( final Aspect aspect )
{
if( aspect == null )
{
return this.createEmptyPhial();
}
// Create the phial
ItemStack phial = new ItemStack( ConfigItems.itemEssence, 1, 1 );
// Set it's aspect
( (ItemEssence)phial.getItem() ).setAspects( phial, new AspectList().add( aspect, EssentiaItemContainerHelper.PHIAL_CAPACITY ) );
return phial;
}
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:22,代码来源:EssentiaItemContainerHelper.java
示例8: onCrafting
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@SubscribeEvent
public void onCrafting(ItemCraftedEvent event) {
if(event.crafting.getItem() == ForbiddenItems.primewell) {
for(int x = 0; x < 9; ++x) {
ItemStack item = event.craftMatrix.getStackInSlot(x);
if(item != null && item.getItem() == ConfigItems.itemEldritchObject) {
++item.stackSize;
event.craftMatrix.setInventorySlotContents(x, item);
}
}
}
if(Compat.bm && event.crafting.getItem() == ForbiddenItems.bloodOrb){
EntityItem ent = event.player.entityDropItem(new ItemStack(ConfigItems.itemEldritchObject, 1, 3), 0);
ent.motionY += randy.nextFloat() * 0.05F;
ent.motionX += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
ent.motionZ += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
}
}
开发者ID:SpitefulFox,项目名称:ForbiddenMagic,代码行数:19,代码来源:FMEventHandler.java
示例9: onItemRightClick
import thaumcraft.common.config.ConfigItems; //导入依赖的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
示例10: onUpdate
import thaumcraft.common.config.ConfigItems; //导入依赖的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: getDrops
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (metadata < 6) {
int q = 1 + world.rand.nextInt(2 + fortune);
for (int a = 0; a < q; ++a) {
drops.add(new ItemStack(ConfigItems.itemShard, 1, metadata));
}
}
drops.addAll(baseBlock.getDrops(world, x, y, z, baseMeta, fortune));
return drops;
}
开发者ID:MJaroslav,项目名称:ThaumOres,代码行数:13,代码来源:BlockInfusedBlockOre.java
示例12: getDropsWand
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
/** Get drop for wand action */
public ArrayList<ItemStack> getDropsWand(World world, int x, int y, int z, int metadata, boolean isPrimal) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (metadata < 6)
if (isPrimal)
drops.add(new ItemStack(TOItems.shardCluster, 1, metadata));
else {
int count = 1;
for (int i = 0; i < 3; i++)
if (world.rand.nextInt(100) + 1 <= 30)
count++;
drops.add(new ItemStack(ConfigItems.itemShard, count, metadata));
}
return drops;
}
开发者ID:MJaroslav,项目名称:ThaumOres,代码行数:16,代码来源:BlockInfusedBlockOre.java
示例13: renderWand
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
private void renderWand(ItemStack wandStack, float ticks) {
GL11.glRotatef(((ticks/3) / 20.0F) * (180F / (float)Math.PI), 0, 1f, 0);
renderTopPart();
if (wandStack != null && wandStack.stackSize > 0) {
GL11.glPushMatrix();
ItemWandCasting item = (ItemWandCasting) ConfigItems.itemWandCasting;
ItemStack wandFocusStack = wandStack.copy();
item.setFocus(wandFocusStack, new ItemStack(ConfigItems.itemFocusPrimal));
GL11.glRotatef(180, 1, 0, 0);
GL11.glScalef(0.5f, 0.5f, 0.5f);
GL11.glTranslatef(0, MathHelper.sin((ticks / 3) / 10.0F) * 0.08F + 0.08F, 0);
GL11.glTranslatef(0, -1.4924f, 0);
if(item.isStaff(wandFocusStack)) {
GL11.glTranslatef(0, -0.5f, 0);
STAFF_RENDERER.renderItem(IItemRenderer.ItemRenderType.ENTITY, wandFocusStack);
} else {
WAND_RENDERER.renderItem(IItemRenderer.ItemRenderType.ENTITY, wandFocusStack);
}
GL11.glPopMatrix();
}
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:28,代码来源:RenderTileInfusionClaw.java
示例14: onBlockActivated
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
ItemStack thaumonomicon = new ItemStack(ConfigItems.itemThaumonomicon);
ConfigItems.itemThaumonomicon.onItemRightClick(thaumonomicon, world, player);
/*if(world.isRemote) {
try {
player.openGui(Thaumcraft.instance, 12, world, x, y, z);
Minecraft.getMinecraft().theWorld.playSound(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ, "thaumcraft:page", 0.66F, 1.0F, false);
} catch (Throwable tr) {
Gadomancy.log.warn("Error on opening Thaumcraft Thaumonomicon via KnowledgeBook at world " + world.getWorldInfo().getWorldName() + ", x=" + x + ", y=" + y + ", z=" + z);
}
}*/
return true;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:15,代码来源:BlockKnowledgeBook.java
示例15: onBlockActivated
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float these, float are, float variables) {
ItemStack heldItem = player.getHeldItem();
if (heldItem != null && heldItem.getItem() == ConfigItems.itemEssence) {
if(!world.isRemote) {
BlockStickyJar.handlePhial(world, x, y, z, player, heldItem, (TileJarFillable) world.getTileEntity(x, y, z));
}
return true;
}
return super.onBlockActivated(world, x, y, z, player, side, these, are, variables);
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:12,代码来源:BlockRemoteJar.java
示例16: onBlockActivated
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float these, float are, float variables) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileStickyJar) {
TileStickyJar tileStickyJar = (TileStickyJar) tile;
StickyJarInfo info = RegisteredBlocks.getStickyJarInfo(tileStickyJar.getParentBlock(), world.getBlockMetadata(x, y, z));
ItemStack heldItem = player.getHeldItem();
if (info.needsPhialHandling() && heldItem != null && heldItem.getItem() == ConfigItems.itemEssence) {
if(!world.isRemote) {
handlePhial(world, x, y, z, player, heldItem, tileStickyJar);
}
return true;
}
boolean handleAspectFilter = info.needsLabelHandling() && heldItem != null && heldItem.getItem() == ConfigItems.itemResource
&& heldItem.getItemDamage() == 13 && tileStickyJar.aspectFilter == null
&& (((IEssentiaContainerItem) heldItem.getItem()).getAspects(heldItem) != null || tileStickyJar.amount != 0);
ForgeDirection newDir = tileStickyJar.changeDirection(ForgeDirection.getOrientation(side));
boolean result = ((TileStickyJar) tile).getParentBlock().onBlockActivated(world, x, y, z, player, newDir.ordinal(), these, are, variables);
if (handleAspectFilter) {
tileStickyJar.facing = newDir.ordinal();
tileStickyJar.markDirty();
}
return result;
}
return false;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:34,代码来源:BlockStickyJar.java
示例17: createRecipes
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
public static InfusionUpgradeRecipe[] createRecipes(String research, GolemUpgrade upgrade, int inst, AspectList aspects, ItemStack[] recipe) {
InfusionUpgradeRecipe[] recipes = new InfusionUpgradeRecipe[EnumGolemType.values().length];
for(int i = 0; i < EnumGolemType.values().length ; i++) {
EnumGolemType type = EnumGolemType.values()[i];
if(type.health > 0) {
AdditionalGolemType addType = GadomancyApi.getAdditionalGolemType(type);
Item input = addType == null ? ConfigItems.itemGolemPlacer : addType.getPlacerItem();
recipes[i] = new InfusionUpgradeRecipe(research, upgrade, inst, aspects, new ItemStack(input, 1, type.ordinal()), recipe);
}
}
return recipes;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:14,代码来源:InfusionUpgradeRecipe.java
示例18: getPhialStack
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
private static ItemStack getPhialStack(Aspect aspect, int aspectAmount) {
ItemEssence phial = (ItemEssence) ConfigItems.itemEssence;
ItemStack phialStack = new ItemStack(phial, getPhialAmount(aspectAmount), 1);
if(phialStack.stackSize > 0) {
phial.setAspects(phialStack, new AspectList().add(aspect, 8));
return phialStack;
}
return null;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:10,代码来源:DeprecationItemPaybacks.java
示例19: registerDefaultStickyJars
import thaumcraft.common.config.ConfigItems; //导入依赖的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
示例20: on
import thaumcraft.common.config.ConfigItems; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST, receiveCanceled = true)
public void on(EntityJoinWorldEvent event) {
if(!event.entity.worldObj.isRemote && event.entity instanceof EntityGolemBase) {
EntityGolemBase golem = (EntityGolemBase) event.entity;
ExtendedGolemProperties props = (ExtendedGolemProperties) golem.getExtendedProperties(Gadomancy.MODID);
if(props != null) {
props.setWrapperIfNeeded();
}
}
if (event.entity instanceof EntityItem) {
EntityItem item = (EntityItem) event.entity;
ItemStack stack = item.getEntityItem();
if (stack.getItem() == ConfigItems.itemGolemPlacer) {
AdditionalGolemType type = GadomancyApi.getAdditionalGolemType(EnumGolemType.getType(stack.getItemDamage()));
if (type != null) {
ItemStack fakePlacer = new ItemStack(type.getPlacerItem());
fakePlacer.setTagCompound(stack.getTagCompound());
fakePlacer.setItemDamage(stack.getItemDamage());
item.setEntityItemStack(fakePlacer);
}
}
}
if(!event.world.isRemote && event.entity instanceof EntityLivingBase) {
if(((EntityLivingBase) event.entity).isPotionActive(RegisteredPotions.ACHROMATIC)) {
((DataAchromatic) SyncDataHolder.getDataServer("AchromaticData")).handleApplication((EntityLivingBase) event.entity);
}
}
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:33,代码来源:EventHandlerGolem.java
注:本文中的thaumcraft.common.config.ConfigItems类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论