本文整理汇总了Java中thaumcraft.common.items.wands.ItemWandCasting类的典型用法代码示例。如果您正苦于以下问题:Java ItemWandCasting类的具体用法?Java ItemWandCasting怎么用?Java ItemWandCasting使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemWandCasting类属于thaumcraft.common.items.wands包,在下文中一共展示了ItemWandCasting类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onBlockActivated
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float par7, float par8, float par9) {
TileNodeManipulator tile = (TileNodeManipulator) world.getTileEntity(x, y, z);
ItemStack heldItem = player.getHeldItem();
if(tile.isInMultiblock()) {
super.onBlockActivated(world, x, y, z, player, side, par7, par8, par9);
} else if(!world.isRemote && heldItem != null && heldItem.getItem() instanceof ItemWandCasting) {
tile.checkMultiblock();
if (tile.isMultiblockStructurePresent()) {
String research = tile.getMultiblockType().getResearchNeeded();
if(!ResearchManager.isResearchComplete(player.getCommandSenderName(), research)) return false;
if (ThaumcraftApiHelper.consumeVisFromWandCrafting(player.getCurrentEquippedItem(), player, tile.getMultiblockType().getMultiblockCosts(), true)) {
tile.formMultiblock();
return true;
}
}
}
return false;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:20,代码来源:BlockNodeManipulator.java
示例2: createAuraCoreRecipes
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的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
示例3: on
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST)
public void on(PlayerInteractEvent e) {
if (!e.world.isRemote && e.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK
&& isStickyJar(e.entityPlayer.getHeldItem())) {
if (interacts == null) {
interacts = new HashMap<EntityPlayer, Integer>();
}
interacts.put(e.entityPlayer, e.face);
}
if (e.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
ItemStack i = e.entityPlayer.getHeldItem();
if (i != null && (i.getItem() instanceof ItemWandCasting)) {
WandHandler.handleWandInteract(e.world, e.x, e.y, e.z, e.entityPlayer, i);
}
}
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:18,代码来源:EventHandlerWorld.java
示例4: renderItem
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public void renderItem(net.minecraftforge.client.IItemRenderer.ItemRenderType type, ItemStack item, Object data[]) {
modelex.type = type;
Minecraft mc = Minecraft.getMinecraft();
if (item == null || !(item.getItem() instanceof ItemWandCasting))
return;
EntityLivingBase wielder = null;
if (type == net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED || type == net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON)
wielder = (EntityLivingBase) data[1];
modelex.using = (wielder != null && (wielder instanceof EntityPlayer) && ((EntityPlayer) wielder).getItemInUse() != null) ;
this.owner.renderItem(type, item, data);
}
开发者ID:flammpfeil,项目名称:ExtraScepterStaff,代码行数:18,代码来源:ItemWandRendererEx.java
示例5: wandIfValid
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
/**
* Returns the wand if it is valid and contains enough charge to perform a
* cast.
*
* @param stack
* @param player
* @return
*/
private static ItemWandCasting wandIfValid( final ItemStack stack, final EntityPlayer player )
{
// Ensure it is a wand or staff
if( !ThEUtils.isItemValidWand( stack, true ) )
{
return null;
}
// Get the wand
ItemWandCasting wand = (ItemWandCasting)stack.getItem();
// Ensure there is enough vis for the cast
if( !wand.consumeAllVis( stack, player, ItemFocusAEWrench.castCost, false, false ) )
{
// Not enough vis
return null;
}
// Wand is good and is charged
return wand;
}
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:30,代码来源:ItemFocusAEWrench.java
示例6: updateEntity
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public void updateEntity() {
ic2EnergySink.updateEntity();
if (!this.worldObj.isRemote) {
if (getStackInSlot(0) != null) {
ItemStack wand = getStackInSlot(0);
if (wand != null && wand.getItem() instanceof ItemWandCasting) {
ItemWandCasting wandItem = (ItemWandCasting) wand.getItem();
if (ic2EnergySink.useEnergy(ConfigHandler.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) {
wandItem.addVis(wand, Aspect.ORDER, 1, true);
wandItem.addVis(wand, Aspect.FIRE, 1, true);
wandItem.addVis(wand, Aspect.ENTROPY, 1, true);
wandItem.addVis(wand, Aspect.WATER, 1, true);
wandItem.addVis(wand, Aspect.EARTH, 1, true);
wandItem.addVis(wand, Aspect.AIR, 1, true);
}
}
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
开发者ID:TeamAmeriFrance,项目名称:Electro-Magic-Tools,代码行数:23,代码来源:TileEntityIndustrialWandRecharge.java
示例7: onUsingFocusTick
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) {
if (!player.worldObj.isRemote) {
ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem();
ItemStack armor = player.inventory.armorInventory[1];
if (armor != null) {
if ((ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)))) {
wandItem.addVis(itemstack, Aspect.ORDER, 1, true);
wandItem.addVis(itemstack, Aspect.FIRE, 1, true);
wandItem.addVis(itemstack, Aspect.ENTROPY, 1, true);
wandItem.addVis(itemstack, Aspect.WATER, 1, true);
wandItem.addVis(itemstack, Aspect.EARTH, 1, true);
wandItem.addVis(itemstack, Aspect.AIR, 1, true);
}
}
}
}
开发者ID:TeamAmeriFrance,项目名称:Electro-Magic-Tools,代码行数:20,代码来源:ItemWandChargingFocus.java
示例8: onUpdate
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
if(player.ticksExisted % 100 == 0){
if(player.worldObj.provider.dimensionId == -1){
for(int x = 0;x < primals.length;x++){
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) / 10) {
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
}
}
}
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, Aspect.FIRE) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) / 5) {
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, Aspect.FIRE, 1, true);
}
}
if(player.isBurning())
player.extinguish();
if(player.isPotionActive(Potion.wither.id)) {
if(player.worldObj.isRemote)
player.removePotionEffectClient(Potion.wither.id);
else
player.removePotionEffect(Potion.wither.id);
}
}
开发者ID:SpitefulFox,项目名称:ForbiddenMagic,代码行数:26,代码来源:InfernalWandUpdate.java
示例9: performTrigger
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public boolean performTrigger(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side,
int event) {
ItemWandCasting casting = (ItemWandCasting) wand.getItem();
if (event == id)
if (executionCondition(world, wand, player, x, y, z, side, event))
if (consumeAspects.size() == 0
|| ThaumcraftApiHelper.consumeVisFromWand(wand, player, consumeAspects, true, false))
return executeAction(world, wand, player, x, y, z, side, event);
return true;
}
开发者ID:MJaroslav,项目名称:ThaumOres,代码行数:12,代码来源:TOBaseWandTrigger.java
示例10: renderWand
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的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
示例11: onBlockActivated
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int these, float are, float some, float variables) { //LUL side, hitx, hity, hitz
if(world.isRemote) return false;
TileEntity te = world.getTileEntity(x, y, z);
if(te == null || !(te instanceof TileEssentiaCompressor)) return false;
if(((TileEssentiaCompressor) te).isMultiblockFormed()) {
if(!((TileEssentiaCompressor) te).isMasterTile()) {
int yOffset = ((TileEssentiaCompressor) te).getMultiblockYIndex();
return RegisteredBlocks.blockEssentiaCompressor.onBlockActivated(world, x, y - yOffset, z, player, these, are, some, variables);
}
} else {
ItemStack heldItem = player.getHeldItem();
if(heldItem != null && heldItem.getItem() instanceof ItemWandCasting &&
ResearchManager.isResearchComplete(player.getCommandSenderName(), SimpleResearchItem.getFullName("ESSENTIA_COMPRESSOR"))) {
ChunkCoordinates lowest = findLowestCompressorBlock(world, x, y, z);
boolean canForm = lowest != null && isMuliblockPossible(world, lowest);
if(canForm && ThaumcraftApiHelper.consumeVisFromWandCrafting(player.getCurrentEquippedItem(), player, RegisteredRecipes.costsCompressorMultiblock, true)) {
int multiblockID = TileEssentiaCompressor.getAndIncrementNewMultiblockId();
TileEssentiaCompressor compressor = (TileEssentiaCompressor) world.getTileEntity(lowest.posX, lowest.posY, lowest.posZ);
compressor.setInMultiblock(true, 0, multiblockID);
PacketStartAnimation pkt = new PacketStartAnimation(PacketStartAnimation.ID_SPARKLE_SPREAD, lowest.posX, lowest.posY, lowest.posZ);
NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(world.provider.dimensionId, lowest.posX, lowest.posY, lowest.posZ, 32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
compressor = (TileEssentiaCompressor) world.getTileEntity(lowest.posX, lowest.posY + 1, lowest.posZ);
compressor.setInMultiblock(false, 1, multiblockID);
pkt = new PacketStartAnimation(PacketStartAnimation.ID_SPARKLE_SPREAD, lowest.posX, lowest.posY + 1, lowest.posZ);
point = new NetworkRegistry.TargetPoint(world.provider.dimensionId, lowest.posX, lowest.posY + 1, lowest.posZ, 32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
compressor = (TileEssentiaCompressor) world.getTileEntity(lowest.posX, lowest.posY + 2, lowest.posZ);
compressor.setInMultiblock(false, 2, multiblockID);
pkt = new PacketStartAnimation(PacketStartAnimation.ID_SPARKLE_SPREAD, lowest.posX, lowest.posY + 2, lowest.posZ);
point = new NetworkRegistry.TargetPoint(world.provider.dimensionId, lowest.posX, lowest.posY + 2, lowest.posZ, 32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
}
}
}
return false;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:39,代码来源:BlockEssentiaCompressor.java
示例12: onBlockActivated
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float par7, float par8, float par9) {
if(world.getBlockMetadata(x, y, z) != 1) {
Block up = world.getBlock(x, y + 1, z);
return up != null && up instanceof BlockAuraPylon && up.onBlockActivated(world, x, y + 1, z, player, side, par7, par8, par9);
}
ItemStack heldItem = player.getHeldItem();
if(!world.isRemote && heldItem != null && heldItem.getItem() instanceof ItemWandCasting &&
ResearchManager.isResearchComplete(player.getCommandSenderName(), Gadomancy.MODID.toUpperCase() + ".AURA_PYLON")) {
TileAuraPylon tileAuraPylon = (TileAuraPylon) world.getTileEntity(x, y - 1, z);
if(MultiblockHelper.isMultiblockPresent(world, x, y, z, RegisteredMultiblocks.auraPylonPattern) &&
!tileAuraPylon.isPartOfMultiblock() &&
ThaumcraftApiHelper.consumeVisFromWandCrafting(player.getCurrentEquippedItem(), player, RegisteredRecipes.costsAuraPylonMultiblock, true)) {
PacketStartAnimation pkt = new PacketStartAnimation(PacketStartAnimation.ID_SPARKLE_SPREAD, x, y, z);
NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
TileAuraPylon ta = (TileAuraPylon) world.getTileEntity(x, y - 1, z);
ta.setTileInformation(true, false);
ta = (TileAuraPylon) world.getTileEntity(x, y - 3, z);
ta.setTileInformation(false, true);
int count = 1;
TileEntity iter = world.getTileEntity(x, y - count, z);
while(iter != null && iter instanceof TileAuraPylon) {
((TileAuraPylon) iter).setPartOfMultiblock(true);
world.markBlockForUpdate(x, y - count, z);
iter.markDirty();
pkt = new PacketStartAnimation(PacketStartAnimation.ID_SPARKLE_SPREAD, x, y - count, z);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
count++;
iter = world.getTileEntity(x, y - count, z);
}
}
}
return false;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:36,代码来源:BlockAuraPylon.java
示例13: drainAspectFromWand
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
private Aspect drainAspectFromWand(int cap) {
ItemStack stack = getStackInSlot(0);
if(stack == null || !(stack.getItem() instanceof ItemWandCasting)) return null; //Should never happen..
AspectList aspects = ((ItemWandCasting) stack.getItem()).getAllVis(stack);
for(Aspect a : getRandomlyOrderedPrimalAspectList()) {
if(aspects.getAmount(a) >= 100 && workAspectList.getAmount(a) < cap) {
int amt = aspects.getAmount(a);
((ItemWandCasting) stack.getItem()).storeVis(stack, a, amt - 100);
workAspectList.add(a, 1);
return a;
}
}
return null;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:15,代码来源:TileNodeManipulator.java
示例14: canDrainFromWand
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
private boolean canDrainFromWand(int cap) {
ItemStack stack = getStackInSlot(0);
if(stack == null || !(stack.getItem() instanceof ItemWandCasting)) return false;
AspectList aspects = ((ItemWandCasting) stack.getItem()).getAllVis(stack);
for(Aspect a : Aspect.getPrimalAspects()) {
if(aspects.getAmount(a) < 100) continue;
if(workAspectList.getAmount(a) < cap) return true;
}
return false;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:11,代码来源:TileNodeManipulator.java
示例15: doEntityEffect
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public void doEntityEffect(ChunkCoordinates originTile, Entity e) {
EntityPlayer player = (EntityPlayer) e;
if(player.getHeldItem() != null && player.getHeldItem().getItem() != null && player.getHeldItem().getItem() instanceof ItemWandCasting) {
ItemStack wand = player.getHeldItem();
ItemWandCasting wandCasting = (ItemWandCasting) wand.getItem();
AspectList al = wandCasting.getAspectsWithRoom(wand);
for(Aspect a : al.getAspects()) {
if(a != null) wandCasting.addRealVis(wand, a, 4, true);
}
}
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:14,代码来源:AuraEffects.java
示例16: render
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
@Override
public void render(ItemStack wandStack) {
if(RenderManager.instance.renderEngine == null)
return;
ItemWandCasting wand = (ItemWandCasting)wandStack.getItem();
String tag = wand.getRod(wandStack).getTag();
if(CustomModels.containsKey(tag)){
IModelCustom model = CustomModels.get(tag);
render(wandStack,model);
}else
super.render(wandStack);
}
开发者ID:flammpfeil,项目名称:ExtraScepterStaff,代码行数:15,代码来源:ModelWandEx.java
示例17: areItemStacksEqualLocal
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
public boolean areItemStacksEqualLocal(ItemStack stack0, ItemStack stack1, boolean fuzzy) {
if(stack0 == null || stack1 == null)
return false;
if(stack0.getItem() instanceof ItemWandCasting && stack1.getItem() instanceof ItemWandCasting){
ItemWandCasting wand = (ItemWandCasting)stack1.getItem();
if(wand.getRod(stack1).getTag() == wand.getRod(stack0).getTag()){
return true;
}
}
return super.areItemStacksEqual(stack0, stack1, fuzzy);
}
开发者ID:flammpfeil,项目名称:ExtraScepterStaff,代码行数:15,代码来源:InfusionExtraScepterStaffRecipe.java
示例18: getCraftingScepter
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
/**
* Gets an itemstack representing a fully charged silverwood and thaumium
* crafting scepter.
*
* @return
*/
public ItemStack getCraftingScepter()
{
if( this.craftingScepter == null )
{
// Create the item
this.craftingScepter = new ItemStack( ConfigItems.itemWandCasting, 1, 32767 );
// Set rod type to thaumium
( (ItemWandCasting)this.craftingScepter.getItem() ).setCap( this.craftingScepter, ConfigItems.WAND_CAP_THAUMIUM );
// Set cap type to silverwood
( (ItemWandCasting)this.craftingScepter.getItem() ).setRod( this.craftingScepter, ConfigItems.WAND_ROD_SILVERWOOD );
// Set that it is a scepter
this.craftingScepter.setTagInfo( "sceptre", new NBTTagByte( (byte)1 ) );
// Max out vis storage
for( Aspect aspect : Aspect.getPrimalAspects() )
{
( (ItemWandCasting)this.craftingScepter.getItem() ).addVis( this.craftingScepter, aspect,
( (ItemWandCasting)this.craftingScepter.getItem() ).getMaxVis( this.craftingScepter ), true );
}
}
return this.craftingScepter;
}
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:33,代码来源:VisCraftingHelper.java
示例19: getScepterVisModifier
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
/**
* Gets the vis discount given by the crafting scepter for the specified
* aspect.
*
* @param aspect
* @return
*/
public float getScepterVisModifier( final Aspect aspect )
{
// Ensure the scepter has been created
if( this.craftingScepter == null )
{
this.getCraftingScepter();
}
return ( (ItemWandCasting)this.craftingScepter.getItem() ).getConsumptionModifier( this.craftingScepter, null, aspect, true );
}
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:18,代码来源:VisCraftingHelper.java
示例20: isItemValidWand
import thaumcraft.common.items.wands.ItemWandCasting; //导入依赖的package包/类
/**
* Returns true if the item stack is a wand, scepter, or staff if they are
* allowed.
*
* @param stack
* @param allowStaves
* @return
*/
public static final boolean isItemValidWand( final ItemStack stack, final boolean allowStaves )
{
Item potentialWand;
// Ensure it is not null
if( ( stack == null ) || ( ( potentialWand = stack.getItem() ) == null ) )
{
return false;
}
// Ensure it is a casting wand
if( !( potentialWand instanceof ItemWandCasting ) )
{
return false;
}
// Ensure it is not a staff
if( ( !allowStaves ) && ( ( (ItemWandCasting)potentialWand ).isStaff( stack ) ) )
{
return false;
}
// Get the wand
ItemWandCasting wand = (ItemWandCasting)stack.getItem();
// Validate internals
try
{
wand.getAspectsWithRoom( stack );
}
catch( Exception e )
{
// Internal failure
return false;
}
// Valid wand
return true;
}
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:48,代码来源:ThEUtils.java
注:本文中的thaumcraft.common.items.wands.ItemWandCasting类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论