Java Code Examples for cpw.mods.fml.common.registry.GameRegistry

The following are top voted examples for showing how to use cpw.mods.fml.common.registry.GameRegistry. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: PAYDAY   File: PAYDAY.java   View source code 7 votes vote down vote up
@EventHandler
public void init(FMLInitializationEvent evt) {
	INSTANCE.registerMessage(LobbyPlayerOpenedGuiPacketHandler.class, LobbyPlayerOpenedGuiPacket.class, 0,
			Side.SERVER);

	INSTANCE.registerMessage(LobbyBeginGamePacketHandler.class, LobbyBeginGamePacket.class, 1, Side.SERVER);
	INSTANCE.registerMessage(PacketSyncPlayerPropertiesClientHandler.class, PacketSyncPlayerPropertiesClient.class,
			2, Side.CLIENT);
	INSTANCE.registerMessage(PacketSyncPlayerPropertiesServerHandler.class, PacketSyncPlayerPropertiesServer.class,
			3, Side.SERVER);

	INSTANCE.registerMessage(PacketSyncTileEntityServerHandler.class, PacketSyncTileEntityServer.class, 4,
			Side.SERVER);
	INSTANCE.registerMessage(PacketSyncTileEntityClientHandler.class, PacketSyncTileEntityClient.class, 5,
			Side.CLIENT);

	NetworkRegistry.INSTANCE.registerGuiHandler(PAYDAY.instance, new MGuiHandler());
	GameRegistry.registerBlock(lobbyBlock, "Lobby");
	GameRegistry.registerTileEntity(LobbyTileEntity.class, "lobby_tile_entity");

	FMLCommonHandler.instance().bus().register(eventHandler);
	MinecraftForge.EVENT_BUS.register(eventHandler);
}
 
Example 2
Project: StructPro   File: Structpro.java   View source code 7 votes vote down vote up
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    Configurator.configure(new File("config/" + MODID + ".cfg"));
    GameRegistry.registerWorldGenerator(new Decorator(), 4096);
    FMLCommonHandler.instance().bus().register(this);
    MinecraftForge.EVENT_BUS.register(this);
}
 
Example 3
Project: connor41-etfuturum2   File: EtFuturum.java   View source code 7 votes vote down vote up
@EventHandler
public void init(FMLInitializationEvent event) {
	NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

	ModRecipes.init();

	proxy.registerEvents();
	proxy.registerEntities();
	proxy.registerRenderers();

	if (ModEntityList.hasEntitiesWithEggs()) {
		ModEntityList.entity_egg = new ItemEntityEgg();
		GameRegistry.registerItem(ModEntityList.entity_egg, "entity_egg");
		OreDictionary.registerOre("mobEgg", ModEntityList.entity_egg);
	}

	isTinkersConstructLoaded = Loader.isModLoaded("TConstruct");
}
 
Example 4
Project: Steam-and-Steel   File: GrandItem.java   View source code 6 votes vote down vote up
public static final void init() {

copperingot = new CopperIngot();
aluminiumingot = new AluminiumIngot();
leadingot = new LeadIngot();
nickelingot = new NickelIngot();
tiningot = new TinIngot();
uraniumingot = new UraniumIngot();
ruby = new Ruby();
sulfurdust = new SulfurDust();
glassbottomtank = new GlassBottomTank();

GameRegistry.registerItem(copperingot, "copper_ingot");
GameRegistry.registerItem(aluminiumingot, "aluminium_ingot");
GameRegistry.registerItem(leadingot, "lead_ingot");
GameRegistry.registerItem(nickelingot, "nickel_ingot");
GameRegistry.registerItem(tiningot, "tin_ingot");
GameRegistry.registerItem(uraniumingot, "uranium_ingot");
GameRegistry.registerItem(ruby, "ruby");
GameRegistry.registerItem(sulfurdust, "sulfur_dust");
GameRegistry.registerItem(glassbottomtank, "glass_bottom_tank");

  }
 
Example 5
Project: Steam-and-Steel   File: BaseCraft.java   View source code 6 votes vote down vote up
public static void addRecipe() {
	
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.aluminiumblock), new Object[] { "###", "###", "###", '#', GrandItem.aluminiumingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.aluminiumingot, 9), new Object[] { "#", '#', GrandBlocks.aluminiumblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.copperblock), new Object[] { "###", "###", "###", '#', GrandItem.copperingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.copperingot, 9), new Object[] { "#", '#', GrandBlocks.copperblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.leadblock), new Object[] { "###", "###", "###", '#', GrandItem.leadingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.leadingot, 9), new Object[] { "#", '#', GrandBlocks.leadblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.nickelblock), new Object[] { "###", "###", "###", '#', GrandItem.nickelingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.nickelingot, 9), new Object[] { "#", '#', GrandBlocks.nickelblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.rubyblock), new Object[] { "###", "###", "###", '#', GrandItem.ruby});
	GameRegistry.addRecipe( new ItemStack(GrandItem.ruby, 9), new Object[] { "#", '#', GrandBlocks.rubyblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.tinblock), new Object[] { "###", "###", "###", '#', GrandItem.tiningot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.tiningot, 9), new Object[] { "#", '#', GrandBlocks.tinblock});
	GameRegistry.addRecipe( new ItemStack(GrandBlocks.uraniumblock), new Object[] { "###", "###", "###", '#', GrandItem.uraniumingot});
	GameRegistry.addRecipe( new ItemStack(GrandItem.uraniumingot, 9), new Object[] { "#", '#', GrandBlocks.uraniumblock});
	GameRegistry.addRecipe( new ItemStack(GrandFluidTank.glassfluidtank), new Object[] { "###", "# #", "111", '#', Blocks.glass, '1', GrandItem.glassbottomtank});
	GameRegistry.addRecipe( new ItemStack(GrandItem.glassbottomtank, 3), new Object[] { "###", '#', Blocks.glass_pane});
	
}
 
Example 6
Project: minecraft-quiverbow   File: Main.java   View source code 6 votes vote down vote up
private void addWeapon(_WeaponBase weapon, ModelBase model, String weaponName, boolean isClient, String handedness)
{
	if (Main.weapons == null) { Main.weapons = new ArrayList<_WeaponBase>(); }
	
	Main.weapons.add(weapon);
	
	GameRegistry.registerItem(weapon, "weaponchevsky_" + weaponName);	// And register it
	
	weapon.setUniqueName(weaponName);
	
	if (isClient && useModels && model != null)	// Do we care about models? And if we do, do we got a custom weapon model? :O
	{
		if (Main.models == null) { Main.models = new ArrayList<ModelBase>(); }	// Init
		
		Main.models.add(model);								// Keeping track of it
		proxy.registerWeaponRenderer(weapon, (byte) Main.models.indexOf(model));	// And registering its renderer
	}
}
 
Example 7
Project: minecraft-quiverbow   File: ColdIronClip.java   View source code 6 votes vote down vote up
@Override
public void addRecipes() 
{ 
	// A bundle of ice-laced iron ingots (4), merged with a slime ball
       GameRegistry.addShapelessRecipe(new ItemStack(this),
               Items.iron_ingot,
               Items.iron_ingot,
               Items.iron_ingot,
               Items.iron_ingot,
               Blocks.ice,
               Blocks.ice,
               Blocks.ice,
               Blocks.ice,
               Items.slime_ball
       );
}
 
Example 8
Project: minecraft-quiverbow   File: BoxOfFlintDust.java   View source code 6 votes vote down vote up
@Override
public void addRecipes() 
{ 
	// A box of flint dust (4 dust per flint, meaning 32 per box), merged with wooden planks
       GameRegistry.addShapelessRecipe(new ItemStack(this),
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Items.flint,
               Blocks.planks
       ); 
}
 
Example 9
Project: minecraft-quiverbow   File: NetherBellows.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One redstone sprayer (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxz", "zbz", "cya",
				'x', Blocks.piston,
				'y', Blocks.tripwire_hook,
				'z', Blocks.obsidian,
				'a', Items.repeater,
				'b', Blocks.sticky_piston,
				'c', Items.flint_and_steel
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	Helper.registerAmmoRecipe(LargeNetherrackMagazine.class, this);
}
 
Example 10
Project: minecraft-quiverbow   File: SugarEngine.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Sugar Gatling (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "b b", "b b", " m ",
				'b', Helper.getAmmoStack(Part_GatlingBarrel.class, 0),
				'm', Helper.getAmmoStack(Part_GatlingBody.class, 0)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with gatling ammo, setting its clip metadata as ours (Need to be empty for that)
	Helper.registerAmmoRecipe(GatlingAmmo.class, this);
}
 
Example 11
Project: minecraft-quiverbow   File: Crossbow_AutoImp.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One auto-crossbow (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "iii", "scs", " i ",
				'i', Items.iron_ingot,
				's', Blocks.sticky_piston,
				'c', Helper.getWeaponStackByClass(Crossbow_Auto.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack ammo = Helper.getAmmoStack(ArrowBundle.class, 0);

	// Fill what can be filled. One arrow bundle for 8 shots, for up to 2 bundles
	Helper.makeAmmoRecipe(ammo, 1, 8, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(ammo, 2, 16, this.getMaxDamage(), this);
}
 
Example 12
Project: Prospecting   File: Prospecting.java   View source code 6 votes vote down vote up
@EventHandler
public void init(FMLInitializationEvent event) {
	GameRegistry.registerWorldGenerator(new ProspectingWorldGen(), 1000);

	GameRegistry.addRecipe(new ItemStack(ProspectingItems.prospecting_pan), new Object[] {"s s", " s ", 's', Blocks.stone_slab});
	GameRegistry.addRecipe(new ItemStack(ProspectingItems.prospecting_pick), new Object[] {"iis", "  s", 'i', Items.iron_ingot, 's', Items.stick});
	GameRegistry.addRecipe(new ItemStack(ProspectingItems.sifting_pan), new Object[] {"s s", "s#s", "s#s", 's', Items.stick, '#', Items.string});
}
 
Example 13
Project: minecraft-quiverbow   File: OSP.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Obsidian Splinter
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), " io", "ipi", "oft",
				'o', Blocks.obsidian,
				'i', Items.iron_ingot,
				'p', Blocks.piston,
				'f', Items.flint_and_steel,
				't', Blocks.tripwire_hook
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with obsidian magazine, setting its ammo metadata as ours (Need to be empty for that)
	Helper.registerAmmoRecipe(ObsidianMagazine.class, this);
}
 
Example 14
Project: minecraft-quiverbow   File: RPG.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Firework Rocket Launcher (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "x  ", "yx ", "zyx",
				'x', Blocks.planks,
				'y', Items.iron_ingot,
				'z', Items.flint_and_steel
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Fill the RPG with 1 rocket
	GameRegistry.addRecipe(new ItemStack(this), " ab", "zya", " x ",
			'x', new ItemStack(this, 1 , this.getMaxDamage()),
			'y', Blocks.tnt,
			'z', Blocks.planks,
			'a', Items.paper,
			'b', Items.string
			);
}
 
Example 15
Project: minecraft-quiverbow   File: OWR.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One wither rifle (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "odo", "owo", "oso",
				'o', Blocks.obsidian,
				'd', Items.diamond,
				's', Items.nether_star,
				'w', Helper.getWeaponStackByClass(OSR.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with obsidian magazine, setting its ammo metadata as ours (Need to be empty for that)
	Helper.registerAmmoRecipe(ObsidianMagazine.class, this);
}
 
Example 16
Project: minecraft-quiverbow   File: Crossbow_Blaze.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One blaze crossbow (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "bib", "ici", "bib",
				'b', Items.blaze_powder,
				'i', Items.iron_ingot,
				'c', Helper.getWeaponStackByClass(Crossbow_Compact.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	GameRegistry.addShapelessRecipe(new ItemStack(this),	// Fill the empty blaze crossbow with one rod
			Items.blaze_rod,
			new ItemStack(this, 1 , this.getMaxDamage())
			);
}
 
Example 17
Project: minecraft-quiverbow   File: QuiverBow.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()	// Enabled defines whether or not the item can be crafted. Reloading existing weapons is always permitted.
{
	if (this.Enabled)
	{
		// One quiverbow with 256 damage value (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxy", "xzy", "zxy",
				'x', Items.stick,
				'y', Items.string,
				'z', Items.leather
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Ammo
	ItemStack bundle = Helper.getAmmoStack(ArrowBundle.class, 0);

	Helper.makeAmmoRecipe(bundle, 1, 8, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(bundle, 2, 16, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(bundle, 3, 24, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(bundle, 4, 32, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(bundle, 5, 40, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(bundle, 6, 48, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(bundle, 7, 56, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(bundle, 8, 64, this.getMaxDamage(), this);
}
 
Example 18
Project: minecraft-quiverbow   File: MediGun.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// Use a beacon for this (+ obsidian, tripwire hook... what else)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "bi ", "ico", " ot",
				'b', Blocks.beacon,
				'o', Blocks.obsidian,
				't', Blocks.tripwire_hook,
				'c', Items.cauldron,
				'i', Items.iron_ingot
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	RecipeSorter.register("quiverchevsky:recipehandler_roh_reload", Recipe_RayOfHope_Reload.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");

	ArrayList list = new ArrayList();

	list.add(new ItemStack(Items.potionitem, 1, 8193));
	list.add(new ItemStack(Items.potionitem, 1, 8225));

	GameRegistry.addRecipe(new Recipe_RayOfHope_Reload(new ItemStack(this), list, new ItemStack(Items.potionitem, 1, 8193), new ItemStack(Items.potionitem, 1, 8225)));
}
 
Example 19
Project: minecraft-quiverbow   File: AquaAccelerator.java   View source code 6 votes vote down vote up
@Override
   public void addRecipes()
{ 
	if (Enabled)
       {
		// One Aqua Accelerator (empty)
           GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "ihi", "gpg", "iti",		
                  'p', Blocks.piston,
                  't', Blocks.tripwire_hook,
                  'i', Items.iron_ingot,
                  'h', Blocks.hopper,
                  'g', Blocks.glass_pane
           );
       }
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu
	
	// Fill the AA with one water bucket
       GameRegistry.addShapelessRecipe(new ItemStack(this),						
       		Items.water_bucket, 
       		new ItemStack(this, 1 , this.getMaxDamage())	// Empty
       );
}
 
Example 20
Project: minecraft-quiverbow   File: ERA.java   View source code 6 votes vote down vote up
private void registerRepair()
{
	ItemStack[] repair = new ItemStack[9];
	
	// Top row
	//repair[0] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	repair[1] = new ItemStack(Blocks.golden_rail);
	//repair[2] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	
	// Middle row
	repair[3] = new ItemStack(Blocks.golden_rail);
	repair[4] = new ItemStack(this, 1 , this.getMaxDamage());
	repair[5] = new ItemStack(Blocks.golden_rail);
	
	// Bottom row
	repair[6] = new ItemStack(Items.redstone);
	repair[7] = new ItemStack(Items.iron_ingot);
	repair[8] = new ItemStack(Items.redstone);
	        
       GameRegistry.addRecipe(new Recipe_ERA(repair, new ItemStack(this)));
}
 
Example 21
Project: minecraft-quiverbow   File: ERA.java   View source code 6 votes vote down vote up
private void registerUpgrade()
{
	ItemStack[] recipe = new ItemStack[9];
	
	// Top row
	recipe[0] = new ItemStack(Blocks.quartz_block);				// 0 1 2
	recipe[1] = new ItemStack(Items.emerald);					// - - -
	//recipe[2] = null;											// - - -
	
	// Middle row
	recipe[3] = new ItemStack(Blocks.emerald_block);			// - - -
	//recipe[4] = null;											// 3 4 5
	recipe[5] = new ItemStack(Items.emerald);					// - - -
	
	// Bottom row
	recipe[6] = new ItemStack(this);							// - - -
	recipe[7] = new ItemStack(Blocks.emerald_block);			// - - -
	recipe[8] = new ItemStack(Blocks.quartz_block);				// 6 7 8
	        
       GameRegistry.addRecipe(new Recipe_Weapon(recipe, new ItemStack(this), 1));	// Emerald Muzzle
}
 
Example 22
Project: minecraft-quiverbow   File: FenFire.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Fen Fire (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "di ", "i i", " ts",
				't', Blocks.tripwire_hook,
				'i', Items.iron_ingot,
				's', Blocks.sticky_piston,
				'd', Blocks.trapdoor
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack stack = new ItemStack(Blocks.glowstone);

	Helper.makeAmmoRecipe(stack, 1, 4, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 2, 8, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 3, 12, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 4, 16, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 5, 20, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 6, 24, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 7, 28, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 8, 32, this.getMaxDamage(), this);
}
 
Example 23
Project: minecraft-quiverbow   File: ProximityNeedler.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "ihi", "bpb", "tsi",
				't', Blocks.tripwire_hook,
				'b', Blocks.iron_bars,
				'i', Items.iron_ingot,
				'h', Blocks.hopper,
				's', Blocks.sticky_piston,
				'p', Blocks.piston
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Ammo
	Helper.registerAmmoRecipe(NeedleMagazine.class, this);
}
 
Example 24
Project: minecraft-quiverbow   File: PowderKnuckle_Mod.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// Modifying the powder knuckle once
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "ooo", "oco", "i i",
				'c', Helper.getWeaponStackByClass(PowderKnuckle.class, true),
				'o', Blocks.obsidian,
				'i', Items.iron_ingot
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack stack = new ItemStack(Items.gunpowder);

	Helper.makeAmmoRecipe(stack, 1, 1, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 2, 2, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 3, 3, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 4, 4, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 5, 5, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 6, 6, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 7, 7, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 8, 8, this.getMaxDamage(), this);
}
 
Example 25
Project: minecraft-quiverbow   File: ThornSpitter.java   View source code 6 votes vote down vote up
@Override
   public void addRecipes()
{ 
	if (Enabled)
       {            
           // One Thorn Spitter (empty)
   		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "bib", "php", "sts",
                't', Blocks.tripwire_hook,
                'b', Blocks.iron_bars,
                'i', Items.iron_ingot,
                'h', Blocks.hopper,
         		's', Blocks.sticky_piston,
         		'p', Blocks.piston
        );
       }
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu
	
	Helper.registerAmmoRecipe(NeedleMagazine.class, this);
}
 
Example 26
Project: minecraft-quiverbow   File: DragonBox_Quad.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One QuadBox (empty) An upgrade from the regular Dragonbox (so 3 more flint&steel + Pistons for reloading mechanism  + more barrels)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "ddd", "pdp", "sts",
				'p', Blocks.piston,
				's', Blocks.sticky_piston,
				't', Blocks.tripwire_hook,
				'd', Helper.getWeaponStackByClass(DragonBox.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack stack = Helper.getAmmoStack(RocketBundle.class, 0);

	Helper.makeAmmoRecipe(stack, 1, 8, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 2, 16, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 3, 24, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 4, 32, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 5, 40, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 6, 48, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 7, 56, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 8, 64, this.getMaxDamage(), this);
}
 
Example 27
Project: minecraft-quiverbow   File: SoulCairn.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Soul Cairn (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "e e", "epe", "oto",
				'o', Blocks.obsidian,
				'e', Blocks.end_stone,
				't', Blocks.tripwire_hook,
				'p', Blocks.piston
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reload with 1 diamond
	GameRegistry.addShapelessRecipe(new ItemStack(this),
			Items.diamond,
			new ItemStack(this, 1 , this.getMaxDamage())
			);
}
 
Example 28
Project: minecraft-quiverbow   File: Crossbow_Compact.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One compact crossbow (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxy", "xzy", "zxy",
				'x', Items.stick,
				'y', Items.string,
				'z', Blocks.planks
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	GameRegistry.addShapelessRecipe(new ItemStack(this),	// Fill the empty crossbow with one arrow
			Items.arrow,
			new ItemStack(this, 1 , this.getMaxDamage())
			);
}
 
Example 29
Project: minecraft-quiverbow   File: SeedSweeper.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Seed Sweeper (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), " i ", "ipi", " it",
				'p', Blocks.piston,
				'i', Items.iron_ingot,
				't', Blocks.tripwire_hook
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	Helper.registerAmmoRecipe(SeedJar.class, this);
}
 
Example 30
Project: minecraft-quiverbow   File: CoinTosser_Mod.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// Modifying the Coin Tosser with double piston tech
		GameRegistry.addShapelessRecipe(new ItemStack(this, 1 , this.getMaxDamage()),
				Helper.getWeaponStackByClass(CoinTosser.class, true),
				Blocks.sticky_piston,
				Blocks.tripwire_hook,
				Items.iron_ingot,
				Items.iron_ingot
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Ammo
	Helper.registerAmmoRecipe(GoldMagazine.class, this);
}
 
Example 31
Project: minecraft-quiverbow   File: PowderKnuckle.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Powder Knuckle with 8 damage value (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "yyy", "xzx", "x x",
				'x', Items.leather,
				'y', Items.iron_ingot,
				'z', Items.stick
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack stack = new ItemStack(Items.gunpowder);

	Helper.makeAmmoRecipe(stack, 1, 1, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 2, 2, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 3, 3, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 4, 4, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 5, 5, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 6, 6, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 7, 7, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 8, 8, this.getMaxDamage(), this);
}
 
Example 32
Project: minecraft-quiverbow   File: RPG_Imp.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Improved Rocket Launcher (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "xxx", "yzy", "xxx",
				'x', Blocks.obsidian, 							// Adding an obsidian frame to the RPG
				'y', Items.iron_ingot,
				'z', Helper.getWeaponStackByClass(RPG.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Fill the launcher with 1 big rocket
	Helper.makeAmmoRecipe(Helper.getAmmoStack(LargeRocket.class, 0), 1, 1, this.getMaxDamage(), this);
}
 
Example 33
Project: minecraft-quiverbow   File: Crossbow_Auto.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One auto-crossbow (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "iii", "pcp", " t ",
				'i', Items.iron_ingot,
				'p', Blocks.piston,
				't', Blocks.tripwire_hook,
				'c', Helper.getWeaponStackByClass(Crossbow_Double.class, true)
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu


	GameRegistry.addShapelessRecipe(new ItemStack(this),	// Fill the empty auto-crossbow with one arrow bundle
			Helper.getAmmoStack(ArrowBundle.class, 0),
			new ItemStack(this, 1 , this.getMaxDamage())
			);
}
 
Example 34
Project: minecraft-quiverbow   File: OSR.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One obsidigun (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "x x", "zbz", "xyx",
				'x', Blocks.obsidian,
				'y', Blocks.lever,
				'z', Items.iron_ingot,
				'a', Items.repeater,
				'b', Blocks.piston
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with obsidian magazine, setting its ammo metadata as ours (Need to be empty for that)
	Helper.registerAmmoRecipe(ObsidianMagazine.class, this);
}
 
Example 35
Project: minecraft-quiverbow   File: RedSprayer.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One redstone sprayer (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxz", "aba", "zyz",
				'x', Blocks.piston,
				'y', Blocks.tripwire_hook,
				'z', Items.iron_ingot,
				'a', Items.repeater,
				'b', Blocks.sticky_piston
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	Helper.registerAmmoRecipe(LargeRedstoneMagazine.class, this);
}
 
Example 36
Project: minecraft-quiverbow   File: FrostLancer.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// Upgrade of the EnderRifle

		// One Frost Lancer (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "qiq", "prs", " o ",
				'o', Blocks.obsidian,
				'q', Items.quartz,
				'i', Items.iron_ingot,
				'p', Blocks.piston,
				's', Blocks.sticky_piston,
				'r', Helper.getWeaponStackByClass(EnderRifle.class, true)	// One empty Ender Rifle
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	// Reloading with one Frost Clip
	GameRegistry.addShapelessRecipe(new ItemStack(this),
			new ItemStack(this, 1 , this.getMaxDamage()),
			Helper.getAmmoStack(ColdIronClip.class, 0)
			);
}
 
Example 37
Project: minecraft-quiverbow   File: Sunray.java   View source code 6 votes vote down vote up
@Override
   public void addRecipes()
{ 
	if (Enabled)
       {
		// Using a beacon and solar panels/Daylight Sensors, meaning a nether star is required. So this is a high power item
		GameRegistry.addRecipe(new ItemStack(this), "bs ", "oos", " rt",
           		'b', Blocks.beacon,
           		'o', Blocks.obsidian,
           		's', Blocks.daylight_detector,
           		't', Blocks.tripwire_hook,
           		'r', Items.repeater
           );
       }
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu
}
 
Example 38
Project: minecraft-quiverbow   File: DragonBox.java   View source code 6 votes vote down vote up
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One dragonbox (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxy", "azy", "zxy",
				'x', Items.stick,
				'y', Items.string,
				'z', Items.iron_ingot,
				'a', Items.flint_and_steel
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack stack = Helper.getAmmoStack(RocketBundle.class, 0);

	Helper.makeAmmoRecipe(stack, 1, 8, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 2, 16, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 3, 24, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 4, 32, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 5, 40, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 6, 48, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 7, 56, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 8, 64, this.getMaxDamage(), this);
}
 
Example 39
Project: TFCPrimitiveTech   File: ModItems.java   View source code 6 votes vote down vote up
private static void registerItems()
	{
	  GameRegistry.registerItem(itemWoodenTwig, "itemWoodenTwig");
	  GameRegistry.registerItem(powderAsh, "powderAsh");
	  GameRegistry.registerItem(woodenBucket_BasePotashLiquor, "woodenBucket_BasePotashLiquor");
      if (TFCPrimitiveTech.instance.isPaperEnabled)
      { 
    	  GameRegistry.registerItem(itemCelluloseFibers, "itemCelluloseFibers");
    	  GameRegistry.registerItem(itemWoodenPress, "itemWoodenPress");
	  }
	  GameRegistry.registerItem(itemLeatherBelt, "itemLeatherBelt");
	  GameRegistry.registerItem(itemWoodenClub, "itemWoodenClub");
	  GameRegistry.registerItem(itemClayBrick, "itemClayBrick");
      if (TFCPrimitiveTech.instance.isSlingshotEnabled)
      {
    	  GameRegistry.registerItem(itemSharpStone, "itemSharpStone");
    	  GameRegistry.registerItem(itemHardStone, "itemHardStone");
    	  GameRegistry.registerItem(itemSoftStone, "itemSoftStone");
    	  GameRegistry.registerItem(itemSlingshot, "itemSlingshot");
      }
//	  GameRegistry.registerItem(itemSack, "itemSack");
	}
 
Example 40
Project: Steam-and-Steel   File: GrandBlocks.java   View source code 5 votes vote down vote up
public static final void init() {

		blockcopperore = new BlockCopperOre();
		blocktinore = new BlockTinOre();
		blockleadore = new BlockLeadOre();
		blockuraniumore = new BlockUraniumOre();
		blockaluminiumore = new BlockAluminiumOre();
		blocknickelore = new BlockNickelOre();
		blockrubyore = new BlockRubyOre();
		blocksulfurore = new BlockSulfurOre();
		aluminiumblock = new AluminiumBlock();
		copperblock = new CopperBlock();
		nickelblock = new NickelBlock();
		rubyblock = new RubyBlock();
		leadblock = new LeadBlock();
		tinblock = new TinBlock();
		uraniumblock = new UraniumBlock();
		
		GameRegistry.registerBlock(blockcopperore, "block_copper_ore");
		GameRegistry.registerBlock(blocktinore, "block_tin_ore");
		GameRegistry.registerBlock(blockleadore, "block_lead_ore");
		GameRegistry.registerBlock(blockuraniumore, "block_uranium_ore");
		GameRegistry.registerBlock(blockaluminiumore, "block_aluminium_ore");
		GameRegistry.registerBlock(blocknickelore, "block_nickel_ore");
		GameRegistry.registerBlock(blockrubyore, "block_ruby_ore");
		GameRegistry.registerBlock(blocksulfurore, "block_sulfur_ore");
		GameRegistry.registerBlock(aluminiumblock, "aluminium_block");
		GameRegistry.registerBlock(copperblock, "copper_block");
		GameRegistry.registerBlock(leadblock, "lead_block");
		GameRegistry.registerBlock(nickelblock, "nickel_block");
		GameRegistry.registerBlock(rubyblock, "ruby_block");
		GameRegistry.registerBlock(tinblock, "tin_block");
		GameRegistry.registerBlock(uraniumblock, "uranium_block");
		
    }