Jump to content

Recommended Posts

Posted

I am making blocks and such and naturally I need crafting recipes.

    	GameRegistry.addRecipe(new ItemStack(BlocksAS.deviceAnvilBronzeX),new Object[]{"   ","BBB", " BB",'B',ItemsAS.ingotbronze});
    	GameRegistry.addRecipe(new ItemStack(PipeBlocks.deviceAngledSteamPipeXn0),new Object[]{"   ","  P", " P ",'P',BlocksAS.barrel});
    	GameRegistry.addRecipe(new ItemStack(ItemsAS.hammerBronze),new Object[]{" B "," S ", " S ",'B',ItemsAS.ingotbronze,'S',Items.stick});
    	GameRegistry.addRecipe(new ItemStack(BlocksAS.deviceBoilerIdle),new Object[]{"CCC","CFC", "CCC",'F',Blocks.furnace,'C',ItemsAS.ingotbronze});
    	GameRegistry.addRecipe(new ItemStack(BlocksAS.deviceSmelterIdle),new Object[]{"SSS","CSC", "SCS",'S',Blocks.cobblestone,'C',ItemsAS.ingotcopper});

is the code for registering them

 

All of them work perfectly, except the pipe one

    	GameRegistry.addRecipe(new ItemStack(PipeBlocks.deviceAngledSteamPipeXn0),new Object[]{"   ","  P", " P ",'P',BlocksAS.barrel});

This one, I have played around and I have noticed it is the

{"   ","  P", " P ",'P',BlocksAS.barrel}

part that screws me over, the moment I put a custom block there, not custom item, but custom block, it screws me over, what could be causing this?

Posted

I doubt that ist he case as the recipie should be initiated after but here it is! how stupid am I?

 

---- Minecraft Crash Report ----
// Ouch. That hurt 

Time: 2014-09-12 12:26
Description: Initializing game

java.lang.NullPointerException: Initializing game
at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:236)
at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:233)
at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:228)
at aerosteam.crafting.CraftingRecipes.addRecipes(CraftingRecipes.java:14)
at aerosteam.AeroSteam.init(AeroSteam.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:596)
at net.minecraft.client.Minecraft.run(Minecraft.java:941)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at GradleStart.bounce(GradleStart.java:107)
at GradleStart.startClient(GradleStart.java:100)
at GradleStart.main(GradleStart.java:55)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:236)
at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:233)
at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:228)
at aerosteam.crafting.CraftingRecipes.addRecipes(CraftingRecipes.java:14)
at aerosteam.AeroSteam.init(AeroSteam.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:596)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:941)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at GradleStart.bounce(GradleStart.java:107)
at GradleStart.startClient(GradleStart.java:100)
at GradleStart.main(GradleStart.java:55)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_11, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 759567632 bytes (724 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.18.1180 Minecraft Forge 10.13.0.1180 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{7.10.18.1180} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{10.13.0.1180} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized
AeroSteam{1.0} [AeroSteam] (bin) Unloaded->Constructed->Pre-initialized->Errored
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: GeForce GT 610/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.

Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)

Posted

If it helps

    @EventHandler
    public void preInit(FMLInitializationEvent event)
    {
    	BlocksAS.Init();
    	PipeBlocks.Init();
    	FMLCommonHandler.instance().bus().register(new AnvilSmithingHandler());
    	//ItemsAS.Init();
    	
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    	//stuff
    	NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
    	
    	BiomesAS.init();
    	ItemsAS.Init();
    	
    	RecipeRemover.removeRecipe();
    	CraftingRecipes.addRecipes();
    	//Steam stuff
    	Fluid steam = new Fluid("steam").setGaseous(true).setViscosity(100).setTemperature(400).setDensity(100);
    	FluidRegistry.registerFluid(steam);
    	steamRegistered = FluidRegistry.isFluidRegistered("steam");


    	
    	
    	//GameRegistry.registerFuelHandler(new FuelHandler());
    	//Generate world
    	GameRegistry.registerWorldGenerator(eventWorldGen, 0);
    	
    	//Renders
    	neoProxy.registerRenderThings();
    }
}

Posted

 @SidedProxy(clientSide="aerosteam.proxy.ClientProxy",serverSide = "aerosteam.proxy.CommonProxy")
    public static CommonProxy neoProxy;
    

    @EventHandler
    public void preInit(FMLInitializationEvent event)
    {
    	BlocksAS.Init();
    	PipeBlocks.Init();
    	ItemsAS.Init();
    	FMLCommonHandler.instance().bus().register(new AnvilSmithingHandler());
    	//ItemsAS.Init();
    	
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    	//stuff
    	NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());

    	BiomesAS.init();
    	
    	RecipeRemover.removeRecipe();
    	CraftingRecipes.addRecipes();
    	//Steam stuff
    	Fluid steam = new Fluid("steam").setGaseous(true).setViscosity(100).setTemperature(400).setDensity(100);
    	FluidRegistry.registerFluid(steam);
    	steamRegistered = FluidRegistry.isFluidRegistered("steam");


    	
    	
    	//GameRegistry.registerFuelHandler(new FuelHandler());
    	//Generate world
    	GameRegistry.registerWorldGenerator(eventWorldGen, 0);
    	
    	//Renders
    	neoProxy.registerRenderThings();
    }

I ahve this currently and it still crashes, it is in preInit as far as I can tell

Posted

Gladly! This is the main one, the other one called pipes is identeical in structure

 

package aerosteam.blocks;

import aerosteam.AeroSteam;
import aerosteam.SoftMetalOre;
import aerosteam.items.ItemsAS;
import aerosteam.steam.DeviceSteamPipeAngled;
import aerosteam.steam.DeviceSteamPipeStraight;
import aerosteam.tileentity.TileEntityAnvil;
import aerosteam.tileentity.TileEntityBarrel;
import aerosteam.tileentity.TileEntityBoiler;
import aerosteam.tileentity.TileEntityFermentBarrel;
import aerosteam.tileentity.TileEntityMelter;
import aerosteam.tileentity.TileEntitySmelter;
import aerosteam.tileentity.TileEntitySteamPipeAngled;
import aerosteam.tileentity.TileEntitySteamPipeStraight;
import aerosteam.tileentity.TileEntitySteamTank;
import aerosteam.tileentity.TileEntityTransaltitude;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;

public class BlocksAS {
    //blocks
    public static Block oreCopper;
    public static Block oreTin;
    public static Block oreZinc;
    public static Block orePurplum;
    public static Block oreSilver;
    public static Block oreSaltpeter;
    public static Block pyrite;
    

    public static Block barrel;
    //Devices
    public static Block deviceSmelterIdle;
    public static Block deviceSmelterActive;

    public static Block deviceMelterIdle;
    public static Block deviceMelterActive;
    
    public static Block deviceBoilerIdle;
    public static Block deviceBoilerActive;
    
    public static Block deviceAnvilBronzeX;
    public static Block deviceAnvilBronzeZ;
    
    public static Block deviceTransaltitude;
    
    public static Block deviceGrinder;

    public static Block deviceExplosive;
    //--Steam--
    public static Block deviceSteamTank;
    
    
public static void Init() {
	registerBlocks();
}

private static void registerBlocks() {
    	CreativeTabs aeroTab=AeroSteam.aeroTab;
	//Blocks
    	oreCopper = new SoftMetalOre(1).setBlockName("Copper Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreCopper")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
    	GameRegistry.registerBlock(oreCopper, "Copper Ore");
    	LanguageRegistry.addName(oreCopper, "Copper Ore");
    	oreTin = new SoftMetalOre(2).setBlockName("Tin Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreTin")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(oreTin, "Tin Ore");
      	LanguageRegistry.addName(oreTin, "Tin Ore");
    	oreZinc = new SoftMetalOre(3).setBlockName("Zinc Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreZinc")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(oreZinc, "Zinc Ore");
      	LanguageRegistry.addName(oreZinc, "Zinc Ore");
    	oreSilver = new SoftMetalOre(6).setBlockName("Silver Ore")
  			  .setCreativeTab(aeroTab)
  			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreSilver")
  			  .setHardness(3)
  			  .setStepSound(Block.soundTypeStone)
  			  ;
    	GameRegistry.registerBlock(oreSilver, "Silver Ore");
    	LanguageRegistry.addName(oreSilver, "Silver Ore");

    	orePurplum = new SoftMetalOre(5).setBlockName("Purplum Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OrePurplum")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(orePurplum, "Purplum Ore");
      	LanguageRegistry.addName(orePurplum, "Purplum Ore");
      	
      	pyrite = new SoftMetalOre(4).setBlockName("Pyrite")
    			  .setCreativeTab(AeroSteam.aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "Pyrite")
    			  .setHardness(4)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(pyrite, "Pyrite");
      	LanguageRegistry.addName(pyrite, "Pyrite");
      	oreSaltpeter = new SoftMetalOre(7).setBlockName("Saltpeter Ore")
    			  .setCreativeTab(AeroSteam.aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreSaltpeter")
    			  .setHardness(4)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(oreSaltpeter, "Saltpeter Ore");
      	LanguageRegistry.addName(oreSaltpeter, "Saltpeter Ore");
    	//Devices
    	//--Smelter--
    	deviceSmelterIdle = new DeviceSmelter(false)
    					  .setBlockName("SmelterIdle")
    	    			  .setHardness(5)
    					  .setCreativeTab(aeroTab);
    	deviceSmelterActive = new DeviceSmelter(true)
	  				  .setBlockName("SmelterActive")
	    			  .setHardness(5)
	  				  .setLightLevel(0.625F);
    	GameRegistry.registerBlock(deviceSmelterIdle, "SmelterIdle");
    	GameRegistry.registerBlock(deviceSmelterActive, "SmelterActive");
    	LanguageRegistry.addName(deviceSmelterIdle, "Smelter");
    	LanguageRegistry.addName(deviceSmelterActive, "Smelter");
    	GameRegistry.registerTileEntity(TileEntitySmelter.class,"Smelter");

    	//--Melter--

    	deviceMelterIdle = new DeviceMelter(false)
    					  .setBlockName("MelterIdle")
    	    			  .setHardness(5)
    					  .setCreativeTab(aeroTab);
    	deviceMelterActive = new DeviceMelter(true)
	  				  .setBlockName("MelterActive")
	    			  .setHardness(5)
	  				  .setLightLevel(0.625F);
    	GameRegistry.registerBlock(deviceMelterIdle, "MelterIdle");
    	GameRegistry.registerBlock(deviceMelterActive, "MelterActive");
    	LanguageRegistry.addName(deviceMelterIdle, "Melter");
    	LanguageRegistry.addName(deviceMelterActive, "Melter");
    	GameRegistry.registerTileEntity(TileEntityMelter.class,"Melter");
    	
    	
    	//--Boiler--
    	deviceBoilerIdle = new DeviceBoiler(false)
	  					.setBlockName("BoilerIdle")
	  					.setHardness(5)
	  					.setCreativeTab(AeroSteam.aeroTab);
    	deviceBoilerActive = new DeviceBoiler(true)
    						.setBlockName("BoilerActive")
    						.setHardness(5)
    						.setLightLevel(0.625F);
    	GameRegistry.registerBlock(deviceBoilerIdle, "BoilerIdle");
    	GameRegistry.registerBlock(deviceBoilerActive, "BoilerActive");
    	LanguageRegistry.addName(deviceBoilerIdle, "Boiler");
    	LanguageRegistry.addName(deviceBoilerActive, "Boiler");
    	GameRegistry.registerTileEntity(TileEntityBoiler.class,"Boiler");
    	


    	deviceSteamTank = new DeviceSteamTank().setBlockName("Steam Tank");
    	GameRegistry.registerBlock(deviceSteamTank, "Steam Tank");
    	GameRegistry.registerTileEntity(TileEntitySteamTank.class,"Steam Tank");
    	LanguageRegistry.addName(deviceSteamTank, "Steam Tank");
    	
    	deviceAnvilBronzeX = new DeviceAnvilBronze(1).setBlockName("BronzeAnvil");
    	GameRegistry.registerBlock(deviceAnvilBronzeX, "BronzeAnvilX");
    	LanguageRegistry.addName(deviceAnvilBronzeX, "Bronze Anvil");
    	deviceAnvilBronzeZ = new DeviceAnvilBronze(3).setBlockName("BronzeAnvil");
    	GameRegistry.registerBlock(deviceAnvilBronzeZ, "BronzeAnvilZ");
    	LanguageRegistry.addName(deviceAnvilBronzeZ, "Bronze Anvil");
    	GameRegistry.registerTileEntity(TileEntityAnvil.class,"deviceAnvilBronze");
    	
    	deviceTransaltitude = new DeviceTransaltitude().setBlockName("Transaltituder");
    	GameRegistry.registerBlock(deviceTransaltitude, "Transaltituder");
    	LanguageRegistry.addName(deviceTransaltitude, "Transaltituder");
    	GameRegistry.registerTileEntity(TileEntityTransaltitude.class,"Transaltituder");
    	

    	barrel = new DeviceBarrel().setBlockName("Barrel");
    	GameRegistry.registerBlock(barrel, "Barrel");
    	GameRegistry.registerTileEntity(TileEntityBarrel.class,"Barrel");
    	LanguageRegistry.addName(barrel, "Barrel");
    	

    	deviceExplosive = new DeviceExplosive().setBlockName("Explosive");
    	GameRegistry.registerBlock(deviceExplosive, "Explosive");
    	LanguageRegistry.addName(deviceExplosive, "Explosive");
}

}

Posted
public void preInit(FMLInitializationEvent event)

Replaced my headline with this, not much but thinking i did some misspelling but I'll post it for you to see

 

   

    @EventHandler
    public void preInit(FMLInitializationEvent event)
    {
    	BlocksAS.Init();
    	PipeBlocks.Init();
    	ItemsAS.Init();
    	FMLCommonHandler.instance().bus().register(new AnvilSmithingHandler());
    	//ItemsAS.Init();
    	
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    	//stuff
    	NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());

    	BiomesAS.init();
    	
    	RecipeRemover.removeRecipe();
    	CraftingRecipes.addRecipes();
    	//Steam stuff
    	Fluid steam = new Fluid("steam").setGaseous(true).setViscosity(100).setTemperature(400).setDensity(100);
    	FluidRegistry.registerFluid(steam);
    	steamRegistered = FluidRegistry.isFluidRegistered("steam");


    	
    	
    	//GameRegistry.registerFuelHandler(new FuelHandler());
    	//Generate world
    	GameRegistry.registerWorldGenerator(eventWorldGen, 0);
    	
    	//Renders
    	neoProxy.registerRenderThings();
    }

 

package aerosteam.blocks;

import aerosteam.AeroSteam;
import aerosteam.SoftMetalOre;
import aerosteam.items.ItemsAS;
import aerosteam.steam.DeviceSteamPipeAngled;
import aerosteam.steam.DeviceSteamPipeStraight;
import aerosteam.tileentity.TileEntityAnvil;
import aerosteam.tileentity.TileEntityBarrel;
import aerosteam.tileentity.TileEntityBoiler;
import aerosteam.tileentity.TileEntityFermentBarrel;
import aerosteam.tileentity.TileEntityMelter;
import aerosteam.tileentity.TileEntitySmelter;
import aerosteam.tileentity.TileEntitySteamPipeAngled;
import aerosteam.tileentity.TileEntitySteamPipeStraight;
import aerosteam.tileentity.TileEntitySteamTank;
import aerosteam.tileentity.TileEntityTransaltitude;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;

public class BlocksAS {
    //blocks
    public static Block oreCopper;
    public static Block oreTin;
    public static Block oreZinc;
    public static Block orePurplum;
    public static Block oreSilver;
    public static Block oreSaltpeter;
    public static Block pyrite;
    

    public static Block barrel;
    //Devices
    public static Block deviceSmelterIdle;
    public static Block deviceSmelterActive;

    public static Block deviceMelterIdle;
    public static Block deviceMelterActive;
    
    public static Block deviceBoilerIdle;
    public static Block deviceBoilerActive;
    
    public static Block deviceAnvilBronzeX;
    public static Block deviceAnvilBronzeZ;
    
    public static Block deviceTransaltitude;
    
    public static Block deviceGrinder;

    public static Block deviceExplosive;
    //--Steam--
    public static Block deviceSteamTank;
    
    
public static void Init() {
	registerBlocks();
}

private static void registerBlocks() {
    	CreativeTabs aeroTab=AeroSteam.aeroTab;
	//Blocks
    	oreCopper = new SoftMetalOre(1).setBlockName("Copper Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreCopper")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
    	GameRegistry.registerBlock(oreCopper, "Copper Ore");
    	LanguageRegistry.addName(oreCopper, "Copper Ore");
    	oreTin = new SoftMetalOre(2).setBlockName("Tin Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreTin")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(oreTin, "Tin Ore");
      	LanguageRegistry.addName(oreTin, "Tin Ore");
    	oreZinc = new SoftMetalOre(3).setBlockName("Zinc Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreZinc")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(oreZinc, "Zinc Ore");
      	LanguageRegistry.addName(oreZinc, "Zinc Ore");
    	oreSilver = new SoftMetalOre(6).setBlockName("Silver Ore")
  			  .setCreativeTab(aeroTab)
  			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreSilver")
  			  .setHardness(3)
  			  .setStepSound(Block.soundTypeStone)
  			  ;
    	GameRegistry.registerBlock(oreSilver, "Silver Ore");
    	LanguageRegistry.addName(oreSilver, "Silver Ore");

    	orePurplum = new SoftMetalOre(5).setBlockName("Purplum Ore")
    			  .setCreativeTab(aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OrePurplum")
    			  .setHardness(3)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(orePurplum, "Purplum Ore");
      	LanguageRegistry.addName(orePurplum, "Purplum Ore");
      	
      	pyrite = new SoftMetalOre(4).setBlockName("Pyrite")
    			  .setCreativeTab(AeroSteam.aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "Pyrite")
    			  .setHardness(4)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(pyrite, "Pyrite");
      	LanguageRegistry.addName(pyrite, "Pyrite");
      	oreSaltpeter = new SoftMetalOre(7).setBlockName("Saltpeter Ore")
    			  .setCreativeTab(AeroSteam.aeroTab)
    			  .setBlockTextureName(AeroSteam.MODID + ":" + "OreSaltpeter")
    			  .setHardness(4)
    			  .setStepSound(Block.soundTypeStone)
    			  ;
      	GameRegistry.registerBlock(oreSaltpeter, "Saltpeter Ore");
      	LanguageRegistry.addName(oreSaltpeter, "Saltpeter Ore");
    	//Devices
    	//--Smelter--
    	deviceSmelterIdle = new DeviceSmelter(false)
    					  .setBlockName("SmelterIdle")
    	    			  .setHardness(5)
    					  .setCreativeTab(aeroTab);
    	deviceSmelterActive = new DeviceSmelter(true)
	  				  .setBlockName("SmelterActive")
	    			  .setHardness(5)
	  				  .setLightLevel(0.625F);
    	GameRegistry.registerBlock(deviceSmelterIdle, "SmelterIdle");
    	GameRegistry.registerBlock(deviceSmelterActive, "SmelterActive");
    	LanguageRegistry.addName(deviceSmelterIdle, "Smelter");
    	LanguageRegistry.addName(deviceSmelterActive, "Smelter");
    	GameRegistry.registerTileEntity(TileEntitySmelter.class,"Smelter");

    	//--Melter--

    	deviceMelterIdle = new DeviceMelter(false)
    					  .setBlockName("MelterIdle")
    	    			  .setHardness(5)
    					  .setCreativeTab(aeroTab);
    	deviceMelterActive = new DeviceMelter(true)
	  				  .setBlockName("MelterActive")
	    			  .setHardness(5)
	  				  .setLightLevel(0.625F);
    	GameRegistry.registerBlock(deviceMelterIdle, "MelterIdle");
    	GameRegistry.registerBlock(deviceMelterActive, "MelterActive");
    	LanguageRegistry.addName(deviceMelterIdle, "Melter");
    	LanguageRegistry.addName(deviceMelterActive, "Melter");
    	GameRegistry.registerTileEntity(TileEntityMelter.class,"Melter");
    	
    	
    	//--Boiler--
    	deviceBoilerIdle = new DeviceBoiler(false)
	  					.setBlockName("BoilerIdle")
	  					.setHardness(5)
	  					.setCreativeTab(AeroSteam.aeroTab);
    	deviceBoilerActive = new DeviceBoiler(true)
    						.setBlockName("BoilerActive")
    						.setHardness(5)
    						.setLightLevel(0.625F);
    	GameRegistry.registerBlock(deviceBoilerIdle, "BoilerIdle");
    	GameRegistry.registerBlock(deviceBoilerActive, "BoilerActive");
    	LanguageRegistry.addName(deviceBoilerIdle, "Boiler");
    	LanguageRegistry.addName(deviceBoilerActive, "Boiler");
    	GameRegistry.registerTileEntity(TileEntityBoiler.class,"Boiler");
    	


    	deviceSteamTank = new DeviceSteamTank().setBlockName("Steam Tank");
    	GameRegistry.registerBlock(deviceSteamTank, "Steam Tank");
    	GameRegistry.registerTileEntity(TileEntitySteamTank.class,"Steam Tank");
    	LanguageRegistry.addName(deviceSteamTank, "Steam Tank");
    	
    	deviceAnvilBronzeX = new DeviceAnvilBronze(1).setBlockName("BronzeAnvil");
    	GameRegistry.registerBlock(deviceAnvilBronzeX, "BronzeAnvilX");
    	LanguageRegistry.addName(deviceAnvilBronzeX, "Bronze Anvil");
    	deviceAnvilBronzeZ = new DeviceAnvilBronze(3).setBlockName("BronzeAnvil");
    	GameRegistry.registerBlock(deviceAnvilBronzeZ, "BronzeAnvilZ");
    	LanguageRegistry.addName(deviceAnvilBronzeZ, "Bronze Anvil");
    	GameRegistry.registerTileEntity(TileEntityAnvil.class,"deviceAnvilBronze");
    	
    	deviceTransaltitude = new DeviceTransaltitude().setBlockName("Transaltituder");
    	GameRegistry.registerBlock(deviceTransaltitude, "Transaltituder");
    	LanguageRegistry.addName(deviceTransaltitude, "Transaltituder");
    	GameRegistry.registerTileEntity(TileEntityTransaltitude.class,"Transaltituder");
    	

    	barrel = new DeviceBarrel().setBlockName("Barrel");
    	GameRegistry.registerBlock(barrel, "Barrel");
    	GameRegistry.registerTileEntity(TileEntityBarrel.class,"Barrel");
    	LanguageRegistry.addName(barrel, "Barrel");
    	

    	deviceExplosive = new DeviceExplosive().setBlockName("Explosive");
    	GameRegistry.registerBlock(deviceExplosive, "Explosive");
    	LanguageRegistry.addName(deviceExplosive, "Explosive");
}

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.