Jump to content

Nizen

Members
  • Posts

    17
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

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

Nizen's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Ok, I've learned about it So, now I've that, what I need, but... I can use GL11 to draw my main menu, but the buttons from... vanilla is still work. So, I've tried to change the screen to my own. I did it, but Minecraft crashing. I think it's because I don't include functions in my guiMainMenu ;P (Eclipse not asking about create them) I don't now how to start. I tried copy the vanilla guiMainMenu, but I've a lot of errors :C My code in tickHandler: //... if (mc.currentScreen != null && mc.currentScreen.getClass() == GuiMainMenu.class){ //fontRender.drawStringWithShadow("Mainmenu", x, y, color); mc.currentScreen = new GuiRpgMainMenu(); } //... I can't test it in vanilla guis, because they need a lot of parameters. So, now my problem is how to code my own screen class. Tutorials, ideas, anything will help
  2. So, I've problem with: if (Minecraft.currentScreen != null && Minecraft.currentScreen.getClass() == GuiMainMenu.class){ fontRender.drawStringWithShadow("text", x, y, color); }}; When I add it, Minecraft crashing. Eclipse tell me to change currentScreen to static, but in vanilla code :C
  3. Ok, I've create my tick handler class, but I've no idea, how to check if the currently open screen is the main menu. PS. Where are the vanilla class with drawing main menu? I can't find
  4. Sorry for my bad English, I'm from Poland . Hello I'd like to create custom main menu to minecraft. I have search tutorials, but I don't find something that an help me. I found Main Menu API by kingbdogz, but I've no idea how to use it (add to my mod). I'd like to edit the buttons, change background (without edit the vanilla code and assets!) and other things (like a text and add images). So, help...
  5. Ok, I done public void playerLoggedIn(Player player, NetHandler netHandler, INetworkManager manager) { netHandler.getPlayer().addStat(achievements.Adwenture, 1); }
  6. Ok, I have used ConnectionHandler, but I have error with: public void playerLoggedIn(Player player, NetHandler netHandler, INetworkManager manager) { player.triggerAchievment(achievements.Adwenture, 1); }
  7. Can you (or someone else ) write or give link for an example about use this event? PS: My mod will no support servers
  8. Now, when I use: public void usedBonemeal(World par3World, BonemealEvent event) eclipse don`t show any errors, but minecraft has crashing. When I use: public void usedBonemeal(BonemealEvent event) eclipse asking about change public void spawnParticle(String par1Str, double par2, double par4, double par6, double par8, double par10, double par12) { ... } to static. I can`t do it, becouse that make a lot of errors in other files (and i don`t edit vanilla code )
  9. Still crashing. Eclipse asking about par4, par5, par6.
  10. When I`m add this, I have only errors and crash PS: World.spawnParticle("villagerHappy", par4, par5, par6, 0.0D, 0.5D, 0.0D); give crash too.
  11. Sorry for my bad English, I`m from Poland. Code: package rpgcraft; import java.awt.Event; import java.util.ArrayList; import java.util.Random; import rpgcraft.blocks.Blockdarksapling; import rpgcraft.blocks.blocks; import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.player.BonemealEvent; public class EventClass { @ForgeSubscribe public void usedBonemeal(BonemealEvent event) { int i = 0; int j = (new Random()).nextInt(5); if (event.ID == blocks.darksapling.blockID) { if (i != j) i += i; else if (i == j) { if (!event.world.isRemote) { ((Blockdarksapling)blocks.darksapling).growTree(event.world, event.X, event.Y, event.Z, event.world.rand); event.setResult(Result.ALLOW); } } } } } It work, tree is generating, but it don`t showing particles. Why? And how to fix it?
×
×
  • Create New...

Important Information

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