Jump to content

jonnyetiz

Forge Modder
  • Posts

    3
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Creator of the Magic Trade mod!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jonnyetiz's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello, in these tutorials, i will be showing you(rather telling you) how to start a minecraft forge mod. Follow these steps to actually setup you're mod. [spoiler=REQUIREMENTS:] 1. Eclipse 2. JRE 3. JDK 4. (Recromended) Some java/mc modding experience [spoiler=PART 1/2: Setup]STEP 1. Download eclipse from https://www.eclipse.org/downloads/ STEP 2. Download Minecraft Forge 1.7.10 SRC from http://www.minecraftforge.net/forum/index.php/topic,21177.0.html STEP 3. Un-zip the 1.7.10 SRC to any folder, I called the folder Tutorial, you can call it as you please. STEP 4. Open Command Prompt(cmd) on windows and I think its called command line on mac. STEP 5. Type in cd and drag you're folder into CMD, press enter, a new path should come up with an empty cmd line. STEP 6. Type in gradlew setupDevWorkspace eclipse STEP 7. Wait anywhere from 1-5 minutes for it to download NOTE~ IF you get Build Failed, try again later, it usually means servers are down. STEP 8(Optional). In the folder you created, look for a .project file. If it is there, you are set! [spoiler=PART 2/2: Base File] STEP 1. Open Eclipse then set the path to the file you created + /eclipse STEP 2. Navigate to Minecraft/src/main/java STEP 3. Right click on com.example.examplemod, and hover over Refactor, click rename and rename it to com.'yourname'.'modname', i named mine com.jonnyetiz.tutorial. STEP 4. Right click on ExampleMod.java and rename that as well to the name of You're mod, after that open ExampleMod.java STEP 5. Change the 2 strings to whatever you want, the Modid is not the name, it is how minecraft identifies you're mod, I RECROMEND that you use no spaces and all lower case for modid.. STEP 6. Press Run in the top, it looks like a play button in a green circle, if you look in the console, it will say DIRT BLOCK>> tile.dirt, this means it is working! STEP 7. Close Minecraft and change the example code to 'your mod name'.MODID + " Is Rendering!" STEP 8. Above Version and Below Modid, place in public static final String NAME = "Tutorial Mod"; then after Version at the top in the annotation @Mod, put in name = Tutorial.NAME STEP 9. Run the game. [spoiler=HERE is how to make an MCMOD.info(not required)] STEP 1. Take away the Strings in Tutorial.java, Rename anything that is Tutorial.MODID, VERSION and, NAME you should replace with "insert your text here" STEP 2. Navigate to minecraft/src/main/resources and open mcmod.info STEP 3. Make the modid, mod name and version EXACTLY the same as in you're main file. STEP 4. Change ALL feilds to you're own. STEP 5(Optional). Go to http://www.textcraft.net and create a logo and click download. Then drag the file to eclipse in minecraft/src/main/resources and rename it to logo.png, then in the MCMOD.info, you can set "logoFile": "/logo.png" STEP 6. Run and go to Mods and everything should load! Hope you found interest in this tutorial! I will upload the second tutorial shortly!
  2. done but now i get the following 2 errors. The constructor RenderCondenser(TileEntitySpecialRenderer, TileEntityCondenser) is undefined | In Client Proxy on Line 74 & The method registerItemRenderer(Item, IItemRenderer) in the type MinecraftForgeClient is not applicable for the arguments (Item, RenderCondenser) | In Client Proxy on Line 74
  3. Hello, i am creating a customly rendered block and it will not render in the Inventory, please help! I did try System.out.println("rendering"); in my Render class, nothing shew up. TileEntityCondenser is not included, only thing with it is extends TileEntity. HERE are the classes: [spoiler=ModBlocks.java] package com.jonnyetiz.mtrade.block; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import com.jonnyetiz.mtrade.reference.Names; import cpw.mods.fml.common.registry.GameRegistry; public class ModBlocks { public static Block blockCondenser; public static void loadBlocks() { blockCondenser = new BlockCondenser(Material.wood).setBlockName(Names.Blocks.CONDENSER).setBlockTextureName("magictrade:Condenser.png"); GameRegistry.registerBlock(blockCondenser, Names.Blocks.CONDENSER); } } [spoiler=BlockCondenser.java] package com.jonnyetiz.mtrade.block; import com.jonnyetiz.mtrade.creativetab.CreativeTab; import com.jonnyetiz.mtrade.tileentity.TileEntityCondenser; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class BlockCondenser extends BlockContainer{ public BlockCondenser(Material material) { super(material); //Modifiers this.setCreativeTab(CreativeTab.MT_TAB); this.setHardness(2.0F); this.setResistance(5.0F); this.setLightLevel(0.5F); } public int getRenderType(){ return -100; } public boolean isOpaqueCube(){ return false; } public boolean renderAsNormalBlock(){ return false; } @Override public TileEntity createNewTileEntity(World var1, int var2){ return new TileEntityCondenser(); } } [spoiler=RenderCondenser.java] package com.jonnyetiz.mtrade.renderer; import org.lwjgl.opengl.GL11; import com.jonnyetiz.mtrade.models.ModelCondenser; import com.jonnyetiz.mtrade.reference.Reference; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class RenderCondenser extends TileEntitySpecialRenderer{ private static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID + ":" + "magictrade:ModelCondenser.png"); private ModelCondenser model; public RenderCondenser(){ this.model = new ModelCondenser(); } @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); GL11.glRotatef(180, 0F, 0F, 1F); this.bindTexture(texture); GL11.glPopMatrix(); GL11.glPushMatrix(); this.model.renderModel(0.0625F); System.out.println("rendering"); GL11.glPopMatrix(); } } [spoiler=ClientProxy.java] package com.jonnyetiz.mtrade.proxy; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.MinecraftForge; import com.jonnyetiz.mtrade.MTradeMain; import com.jonnyetiz.mtrade.client.handler.DrawBlockHighlightEventHandler; import com.jonnyetiz.mtrade.client.handler.ItemTooltipEventHandler; import com.jonnyetiz.mtrade.client.handler.KeyInputEventHandler; import com.jonnyetiz.mtrade.client.renderer.item.ItemRendererAlchemicalChest; import com.jonnyetiz.mtrade.client.renderer.tileentity.TileEntityRendererAlchemicalChest; import com.jonnyetiz.mtrade.client.settings.Keybindings; import com.jonnyetiz.mtrade.client.util.ClientSoundHelper; import com.jonnyetiz.mtrade.init.ModBlocks; import com.jonnyetiz.mtrade.reference.Names.Blocks; import com.jonnyetiz.mtrade.reference.RenderIds; import com.jonnyetiz.mtrade.renderer.RenderCondenser; import com.jonnyetiz.mtrade.tileentity.TileEntityAlchemicalChest; import com.jonnyetiz.mtrade.tileentity.TileEntityBlockCondenser; import com.jonnyetiz.mtrade.tileentity.TileEntityCondenser; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; public class ClientProxy extends CommonProxy { @Override public void registerEventHandlers() { super.registerEventHandlers(); FMLCommonHandler.instance().bus().register(new KeyInputEventHandler()); MinecraftForge.EVENT_BUS.register(new ItemTooltipEventHandler()); MinecraftForge.EVENT_BUS.register(new DrawBlockHighlightEventHandler()); } @Override public void registerKeybindings() { ClientRegistry.registerKeyBinding(Keybindings.charge); ClientRegistry.registerKeyBinding(Keybindings.extra); ClientRegistry.registerKeyBinding(Keybindings.release); ClientRegistry.registerKeyBinding(Keybindings.toggle); } @Override public void playSound(String soundName, float xCoord, float yCoord, float zCoord, float volume, float pitch) { ClientSoundHelper.playSound(soundName, xCoord, yCoord, zCoord, volume, pitch); } @Override public void initRenderingAndTextures() { RenderIds.calcinator = RenderingRegistry.getNextAvailableRenderId(); RenderIds.aludel = RenderingRegistry.getNextAvailableRenderId(); RenderIds.alchemicalChest = RenderingRegistry.getNextAvailableRenderId(); RenderIds.glassBell = RenderingRegistry.getNextAvailableRenderId(); RenderIds.researchStation = RenderingRegistry.getNextAvailableRenderId(); RenderIds.augmentationTable = RenderingRegistry.getNextAvailableRenderId(); RenderIds.condenser = RenderingRegistry.getNextAvailableRenderId(); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.alchemicalChest), new ItemRendererAlchemicalChest()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAlchemicalChest.class, new TileEntityRendererAlchemicalChest()); } @Override public void registerRenders() { //Condenser TileEntitySpecialRenderer render0 = new RenderCondenser(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCondenser.class, render0); } @Override public void registerTileEntitySpecialRenderer() { } }
×
×
  • Create New...

Important Information

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