Jump to content

mar21

Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by mar21

  1. Yes But this wont work, it says error nad this: change modifier of blockMetadata to static... //EDIT Small fixes and the code is working, but bit weird It is not rotating properly, like before :! //EDIT Ok, So, I improved the rotating code and the rotating is working fine now. int meta = te.getBlockMetadata(); int rotation = 0; if(meta == 2){rotation = 180;}//SOUTH if(meta == 3){rotation = 0;}//NORTH if(meta == 4){rotation = -90;}//EAST if(meta == 5){rotation = 90;}//WEST GL11.glRotatef(rotation, 0, 1, 0);
  2. Good and No It is hard to understand me ?
  3. Hey man! Do you have 1.5 Minecraft version and latest forge version? Because if I try code, which I writed there it works. Try to recreate it one more time! In main class in load function: The FuelHandler: and try replace this line: Block coalblock = (new BlockCoalBlock(649)).setHardness(3.0F).setResistance(10.0F).setLightValue(0).setUnlocalizedName("coalblock"); with: Block coalblock = new BlockCoalBlock(649).setHardness(3.0F).setResistance(10.0F).setLightValue(0).setUnlocalizedName("coalblock");
  4. I think you need int, not double in section of the code with bold text public static EnumToolMaterial steelMaterial = EnumHelper.addToolMaterial("materialSteel", 2,550,6.2F,2.5,9); So, it need to be (I think): public static EnumToolMaterial steelMaterial = EnumHelper.addToolMaterial("materialSteel", 2,550,6.2F,3,9); And you need to import this: import net.minecraftforge.common.EnumHelper; I wish this will get out the error! //EDIT You need to take attention on the variable types, like: (examples) Float - 0.0F,0.5F,1.6F Double - 0.0,1.0 Boolean - true/false Int - 1,2,3,5 String - "String"
  5. Can you post the code ? Have you imported all right ?
  6. Heh, I set! I am totaly render idiot So, I have this in my rendering class: What I need to write there ??
  7. You need Material for these tools, I think you want to have your own material.. all these lines you need to write into the base class of your mod! Example of Material: And this is for the custom tool: You need to extend: ItemAxe for custom axe ItemPickaxe for custom pickaxe ItemHoe for custom hoe ItemSword for custom sword ItemSpade for custom shovel ItemTool for custom universal tool Example create a class customAxe and edit the: public class customAxe to public class customAxe extends ItemAxe And you have to add unimplemented methods...
  8. Yes ... There is something with rotate in name :
  9. You think custom tool like custom axe/pickaxe/shovel or universal tool ?
  10. as a opengl noob getSide is public static int If you want anything else... I dont know
  11. SO I created a rotation thingy. Code in TileEntityPoweredMelterRender: And changed code in Block class: But there is ONE IMPORTANT PROBLEM If I place the machine, it will rotate as I want... But every machine in world is rotated the same, If I place differently rotated machine, all machines gets the rotation of last placed machine!
  12. Before that rotation worked perfectly. Now with the model doesnt. Hmm, the code doesnt work...
  13. Ou, I think a know what you mean... I think But how I can do this ? I dont know what you mean the world.getBlockTileEntity And I have another question to you, I dont want to create new topic because I think it is not a big problem. I created a custom block model for my machine. Everything is working fine, but the block is rotated only in one direction even If I try to place him to another direction. Explanation: If I place the block, he isnt rotated as it need to be, If you know what I am want to say to you...
  14. Did you tried what I writed before ?
  15. Ok, so. I created a this things in My Tile Entity and My Block Class. How I can "run" this things. It dont do anything. BLOCK CLASS: TILEENTITYCLASS: Yes, I can be mad
  16. I know why it is doing this error. Try replace this line in your FuelHandler: if (par1Fuel.itemID == coalblock.coalblock.blockID) With: if (par1Fuel.blockID == coalblock.coalblock.blockID) I hope, it will works
  17. Yes hydroflame, but the tutorial dont tell me what things I can do with tile entities. But I give you good karma
  18. Post the errorlog. The block worked before without errors? I think you have to replace this line/s:GameRegistry.registerBlock(coalblock); With this: GameRegistry.registerBlock(coalblock,"coalblock"); I wondering this is the error, but I dont know without any logs what is the problem. And why you have this line/s ? @Instance("CoalBlockID") public static coalblock instance; It may be: @Instance public static coalblock instance = new coalblock();
  19. Hello, I know I can search on YT or Google, but I didnt found any (about TileEntities and their usage). Can anyone tell me some basic informations about: What TE doing, what things you can do with them, etc... Or if you know a hyperlink to a good tutorial, you can write the link there Reason: I am currently doing on a Energy Site in my mod. I need TE to do some hard stuff. Like: Thanks very much!
  20. EEE So, the code should be: //EDIT Are you sure the inventoryInstance exist ? Where I need to paste the code ?
  21. So... I need to create a onworldtick or what name it have and insert into him this: inventoryInstance.consumeInventoryItem(inputitem.itemID); inventoryInstance.addItemStackToInventory(new ItemStack(outputitem1.itemID, 1)); and I have two questions: 1) How I can create a variable par0Random with random number between 1 and 8 ? I tried int par0Random = Random(); but that doesnt work. 2) How I can check the inputitem only in one slot ? Thanks
  22. I think you need the: MAINCLASS.BLOCKUNLOCALIZEDNAME.blockID MAINCLASS - mod main class or class where you have : test = new TestBlock(1, Material.rock)... BLOCKUNLOCALIZEDNAME - unlocalizedname of your block
  23. As wrote ObsequiousNewt you need the own FuelHandler class. Like: The required BURNINGTIME for 1 Item or Block is 200 And the YOURBLOCKUNLOCALIZEDNAME is unlocalized name of your block you want to be a fuel. And this you need to write into your main mod class: This works for me.
  24. Hello, I want to have random chance to get from item smelting a custom item. Explanation: When I smelt a "Random Ingot" a want to get "Iron Ingot" or "Gold Ingot". I think: random - int between 1 - 3 if(par0Random == 1){FurnaceRecipes...} Or no ?!
×
×
  • Create New...

Important Information

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