Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

godbaba

Members
  • Joined

  • Last visited

Everything posted by godbaba

  1. It gets arranged by item id low to high
  2. Hello people ! Im trying to find tutorials like furnaces but all I found is outdated or not explanotory can anyone help me with this ? PLEASE dont post the tutorial link to the wiki because its not even close to useful... Thanks !
  3. Very interesting its really not working It was working in 1.5.1 in 1.5.2 its not working
  4. here is an example of how to use it Im sure you can figure out from there public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add("Hello World!"); }
  5. If you want to learn about guis I advice you to follow this guy http://www.youtube.com/user/DiedGaming5049/videos I have no information on guis but this guy is helpful alot at least for me
  6. found out that it must be initGui not init_gui
  7. No ideas why
  8. I never worked with entities but I think Bat codes should help you
  9. Hello guys I just started working with guis and first code i wrote is not working I got it from a youtube video it works there but it does not work for me Item Code: package mod.bushcraft; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.src.ModLoader; import net.minecraft.world.World; public class playerrespawner extends Item{ private Minecraft mc; public playerrespawner(int par1) { super(par1); this.setCreativeTab(main.bushtab); } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { mc = ModLoader.getMinecraftInstance(); mc.displayGuiScreen(new testGUI(par2World, par3EntityPlayer, mc)); return par1ItemStack; } } guicode : package mod.bushcraft; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class testGUI extends GuiScreen{ private World worldMC; private EntityPlayer entityP; private Minecraft mineC; public testGUI(World world, EntityPlayer entityplayer, Minecraft minecraft){ worldMC = world; entityP = entityplayer; mineC = minecraft; } public void init_gui(){ buttonList.add(new GuiButton(0, width / 2 - 50, height / 2 - 50, 100, 20, "Respawn Me!")); } protected void actionPerformed(GuiButton guiButton) { if(guiButton.id == 0) { this.entityP.respawnPlayer(); } } }
  10. http://www.minecraftforge.net/forum/index.php/topic,8471.0.html Check this topic I think this can help you
  11. Thanks you man I figured the author and title part out but I didnt had enough knowledge to add pages you helped me alot thanks
  12. The basic is simple public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { par1World.setBlock(par2, par3, par4, BlockID); } par2 is your X coordinate of your block par3 is your Y coordinate of your block par4 is your Z coordinate of your block BlockId is the block you want to place at that coordinate Here is some example code im using in my mod to build a small tent public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { par1World.spawnParticle("smoke", par2, par3, par4, 0.1F, 0.1F, 0.1F); par1World.setBlock(par2, par3, par4,61); par1World.setBlock(par2, par3+1, par4,61); par1World.setBlock(par2, par3+2, par4,35); par1World.setBlock(par2-1, par3, par4,58); par1World.setBlock(par2-2, par3, par4,35); par1World.setBlock(par2-1, par3+1, par4,35); par1World.setBlock(par2+1, par3, par4,58); par1World.setBlock(par2+2, par3, par4,35); par1World.setBlock(par2+1, par3+1, par4,35); par1World.setBlock(par2-1, par3, par4-1,85); par1World.setBlock(par2-2, par3, par4-1,35); par1World.setBlock(par2-1, par3+1, par4-1,35); par1World.setBlock(par2+1, par3, par4-1,85); par1World.setBlock(par2+2, par3, par4-1,35); par1World.setBlock(par2+1, par3+1, par4-1,35); par1World.setBlock(par2, par3, par4-1,85); par1World.setBlock(par2, par3+1, par4-1,85); par1World.setBlock(par2, par3+2, par4-1,35); par1World.setBlock(par2-2, par3, par4+1,35); par1World.setBlock(par2-1, par3+1, par4+1,35); par1World.setBlock(par2+2, par3, par4+1,35); par1World.setBlock(par2+1, par3+1, par4+1,35); par1World.setBlock(par2, par3+2, par4+1,35); return true; };
  13. If I understand what you mean this is what you need @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack par1ItemStack) { return true; }
  14. No one who can help ?
  15. Hello guys in my mod I want to add a book like recipe book but im not advance enough to make my own gui so I want to give player the vanilla writen books I have some information that I need to write nbt data on ItemStack such as author : title : and pages But I have no idea where to start or what to do... Can anyone help me with this ? I hope i could explain myself
  16. Nope blocks were appearing but i thought this.setCreativeTab is an optional choice
  17. It really worked I wasnt expecting that ! Thanks man...
  18. Hello guys here is my code i write in a small amount of time.I realised that items not appearing in game when i change the code and somehow make them appear my blocks are not appearing can someone help me please ? main.java: package mod.exdream; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.src.BaseMod; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="exdream",name="Ex-Dream",version="v.0.1") @NetworkMod(clientSideRequired=true,serverSideRequired=false) public class main extends BaseMod{ public static String version = "v.0.1"; public static Block blok = new blok(500).setUnlocalizedName("test"); public static Block stem = new blok(501).setUnlocalizedName("stemo"); public static Block ethox = new blok(502).setUnlocalizedName("ethox"); public static Item recip = new addItem(503).setUnlocalizedName("recip"); @Init public void load(FMLInitializationEvent event){ //blok = new blok(500).setUnlocalizedName("test"); GameRegistry.registerItem(recip,"recip"); LanguageRegistry.addName(recip, "Recipe"); GameRegistry.registerBlock(blok,"test"); LanguageRegistry.addName(blok, "test"); GameRegistry.registerBlock(stem,"stem"); LanguageRegistry.addName(stem, "stem"); GameRegistry.registerBlock(ethox,"ethox"); LanguageRegistry.addName(ethox, "Ethox"); } @Override public String getVersion() { // TODO Auto-generated method stub return version; } @Override public void load() { // TODO Auto-generated method stub } } blok.java : package mod.exdream; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class blok extends Block{ public blok(int par1) { super(par1, Material.air); // TODO Auto-generated constructor stub } } addItem.java : package mod.exdream; import net.minecraft.item.Item; public class addItem extends Item{ public addItem(int par1) { super(par1); // TODO Auto-generated constructor stub } } By appear i mean they are not in the game when you use /give command you get item doesnt exist error and they are not avaible in creative tabs.Im waiting for an answer... Regards , Godbaba...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.