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


Java Items.SLIME_BALL属性代码示例

本文整理汇总了Java中net.minecraft.init.Items.SLIME_BALL属性的典型用法代码示例。如果您正苦于以下问题:Java Items.SLIME_BALL属性的具体用法?Java Items.SLIME_BALL怎么用?Java Items.SLIME_BALL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraft.init.Items的用法示例。


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

示例1: getDyeCraftingResult

private static ItemStack getDyeCraftingResult(int meta) {
	
	switch (meta) {
		default: return new ItemStack(Items.GHAST_TEAR);
		case 1: return new ItemStack(Items.FIRE_CHARGE, 8, 0);
		case 2: return new ItemStack(Items.DRAGON_BREATH);
		case 3: return new ItemStack(Items.DIAMOND);
		case 4: return new ItemStack(Items.GOLD_INGOT);
		case 5: return new ItemStack(Items.SLIME_BALL, 4, 0);
		case 6: return new ItemStack(Items.SADDLE);
		case 7: return new ItemStack(Blocks.CLAY, 8, 0);
		case 8: return new ItemStack(Items.IRON_INGOT, 2, 0);
		case 9: return new ItemStack(Blocks.STAINED_HARDENED_CLAY, 16, EnumDyeColor.CYAN.getMetadata());
		case 10: return new ItemStack(Items.CHORUS_FRUIT);
		case 11: return new ItemStack(Blocks.PRISMARINE, 8, 0);
		case 12: return new ItemStack(Blocks.DIRT, 3, 0);
		case 13: return new ItemStack(Items.EMERALD);
		case 14: return new ItemStack(Items.NETHER_WART);
		case 15: return new ItemStack(Items.SKULL, 1, 1);
	}
}
 
开发者ID:bafomdad,项目名称:uniquecrops,代码行数:21,代码来源:UCRecipes.java

示例2: init

public static void init() {

		slime = new SlimeRecipe(new ItemStack(Items.SLIME_BALL), 1200, 0);
		slime.setRegistryName(LibMod.MOD_ID, "slime");
		// potionDetonation = new PotionExplosion(ItemStack.EMPTY, ItemStack.EMPTY, 100, 200);
		// potionDetonation.setRegistryName(Reference.MID, "detonation");
		registerAll();
	}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:8,代码来源:ModBarrelRecipes.java

示例3: performLegacyCurse

/**
 * Original KodaichiZero slime curse - fill the player's inventory with slime balls
 */
private void performLegacyCurse()
{
	EntityPlayer player = (EntityPlayer)this.victim;
	ItemStack stack = new ItemStack(Items.SLIME_BALL, 16 + this.rand.nextInt(17), 0);
	EntityItem entityItem = new EntityItem(this.world, this.posX, this.posY, this.posZ, stack);

	if (player.inventory.addItemStackToInventory(stack))
	{
		ForgeEventFactory.onItemPickup(entityItem, player);
		player.playSound(SoundEvents.ENTITY_SLIME_ATTACK, 0.75F, (this.rand.nextFloat() * 0.2F) + 0.9F);
	}
}
 
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:15,代码来源:EntitySlimeCurse.java

示例4: matches

@Override
public boolean matches(InventoryCrafting inventorycrafting, World world) {
	int launchers = 0;
	int slimeballs = 0;
	int feathers = 0;
	int ingots = 0;
	boolean activator = false;
	boolean shotblock = false;
	/*
	 * int bows=0; int flintandsteel=0; int powder=0; int redstone=0;
	 */
	for (int i = 0; i < inventorycrafting.getSizeInventory(); i++)
		if (inventorycrafting.getStackInSlot(i) != null && inventorycrafting.getStackInSlot(i).getCount() != 0)
			if (inventorycrafting.getStackInSlot(i).getItem() instanceof TNTCannon) {
				launchers++;
				activator = BlockLauncher.cannon.isActivator(inventorycrafting.getStackInSlot(i));
				shotblock = BlockLauncher.cannon.isSpreader(inventorycrafting.getStackInSlot(i));
			} else if (inventorycrafting.getStackInSlot(i).getItem() == Items.SLIME_BALL)
				slimeballs++;
			else if (inventorycrafting.getStackInSlot(i).getItem() == Items.FEATHER)
				feathers++;
			else if (inventorycrafting.getStackInSlot(i).getItem() == Items.IRON_INGOT)
				ingots++;
			else
				return false;
	if (launchers == 1 && (slimeballs == 0 || slimeballs == 4 || slimeballs == 8)
			&& (feathers == 0 || (feathers == 4 && activator)) && (ingots == 0 || ingots == 4 || (ingots == 8 && shotblock)))
		return true;
	return false;
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:30,代码来源:RecipesBlockLauncher.java

示例5: getItemDropped

@Override
@SideOnly(Side.CLIENT)
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
	return Items.SLIME_BALL;
}
 
开发者ID:YoungGT,项目名称:EasyCraft,代码行数:5,代码来源:BlockSlimeBlock.java

示例6: getDropItem

protected Item getDropItem()
{
    return this.getSlimeSize() == 1 ? Items.SLIME_BALL : null;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:4,代码来源:EntitySlime.java

示例7: createParticle

public Particle createParticle(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
{
    return new ParticleBreaking(worldIn, xCoordIn, yCoordIn, zCoordIn, Items.SLIME_BALL);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:4,代码来源:ParticleBreaking.java

示例8: getCraftingResult

@Override
public ItemStack getCraftingResult(InventoryCrafting inventorycrafting) {
	int launchers = 0;
	int launcherslot = -1;
	int slimeballs = 0;
	int feathers = 0;
	int ingots = 0;
	/*
	 * int bows=0; int flintandsteel=0; int powder=0; int redstone=0;
	 */
	for (int i = 0; i < inventorycrafting.getSizeInventory(); i++)
		if (inventorycrafting.getStackInSlot(i) != null && inventorycrafting.getStackInSlot(i).getCount() != 0)
			if (inventorycrafting.getStackInSlot(i).getItem() instanceof TNTCannon) {
				launchers++;
				launcherslot = i;
			} else if (inventorycrafting.getStackInSlot(i).getItem() == Items.SLIME_BALL)
				slimeballs++;
			else if (inventorycrafting.getStackInSlot(i).getItem() == Items.FEATHER)
				feathers++;
			else if (inventorycrafting.getStackInSlot(i).getItem() == Items.IRON_INGOT)
				ingots++;
			else
				return null;
	if (launchers == 1) {
		ItemStack stack = inventorycrafting.getStackInSlot(launcherslot).copy();
		if (stack.getTagCompound() == null)
			stack.setTagCompound(new NBTTagCompound());
		if (slimeballs == 4) {
			stack.getTagCompound().setBoolean("Sticky", true);
			stack.getTagCompound().removeTag("Bouncy");
		} else if (slimeballs == 8) {
			stack.getTagCompound().setBoolean("Bouncy", true);
			stack.getTagCompound().removeTag("Sticky");
		}
		if (feathers == 4)
			stack.getTagCompound().setBoolean("Harmless", true);
		if (ingots == 8)
			stack.getTagCompound().setBoolean("Stack", true);
		else if(ingots == 4)
			stack.getTagCompound().setBoolean("Crushing", true);
		/*
		 * if(bows==1){ stack.getTagCompound().setBoolean("BowLike",true); }
		 * if(flintandsteel==1){
		 * stack.getTagCompound().setBoolean("Activator",true); }
		 * if(powder==1){ stack.getTagCompound().setBoolean("Powder", true);
		 * } if(redstone==1){ stack.getTagCompound().setBoolean("Glowstone",
		 * true); }
		 */
		return stack;
	}
	return ItemStack.EMPTY;
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:52,代码来源:RecipesBlockLauncher.java


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