Jump to content

Zcelo12

Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by Zcelo12

  1. Open the Launcher, select Client and select your minecraft directory. Did you already installed the new launcher? If yes, select the directory where you installed it. The Src-folder is for creating mods.
  2. You also have to register your Entity, if you haven't. EntityRegistry.registerGlobalEntityID(YourArrow.class, "Your Arrow", 212);
  3. I'm using IPlayerTracker for that. The problem is when I add that to OnPlayerLogin, nothing happens: new UpdateCheck();
  4. I created a class named UpdateCheck: package test.misc; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.util.Map; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; public class UpdateCheck { private final String updateURL = "MyURL"; private class UpdateCheckThread extends Thread { @Override public void run() { try { Map<String, ModContainer> modMap = Loader.instance().getIndexedModList(); ModContainer Mod; URL versionDataFile = new URL(updateURL); BufferedReader reader = new BufferedReader(new InputStreamReader(versionDataFile.openStream())); String curLine; while ((curLine = reader.readLine()) != null) { String[] tokens = curLine.split("="); if ((Mod = modMap.get(tokens[0].trim())) != null) { if (!isModUpToDate(Mod.getVersion(), tokens[1].trim())) { FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage("A newer version of Test is available: "+tokens[1].trim()+", get it at test.net"); } } else if (tokens[0].trim().equals("mc")) { if (!Loader.instance().getMCVersionString().equals(tokens[1].trim())) { System.out.println("According to website, current mcversion is: "+tokens[1].trim()); break; } } } } catch (Exception e) { System.err.println("Error while checking for updates:"); e.printStackTrace(); } } private boolean isModUpToDate(String localVersion, String webVersion) { boolean newer = false; for (int i = 0; i < Math.min(localVersion.length(), webVersion.length()); i++) { int comparedchar = webVersion.substring(i, i + 1).compareTo(localVersion.substring(i, i + 1)); if (comparedchar < 0) newer = true; if (!newer && comparedchar > 0) return false; } if (webVersion.length() > localVersion.length() && !newer) return false; return true; } } } How can I initialize it when the player joins at OnPlayerLogin(EntityPlayer player) ?
  5. Hello, I'm trying to make a small Update Check for my mod. I already have a .txt File on my Server, but now i don't know how to check the lines with Forge and then check it with my mod_version. I only want to do that, when the player joins in the world. The Function for that I already have, because I've there some other steps. Could somebody help me?
  6. Thanks to all, it din't work so I found a work-arround my way.
  7. Ok, I extended ItemFishingRod and changed the onItemRightClick function only to my EntityFishingHook class. When I don't extend EntityFishHook in EntityFishingHok, i get 2 errors in this.angler.fishentity= this; and some similiar. public EntityFishHook fishEntity is only defined in EntityPlayer. When I extend EntityFishHook it works. So how do you think should I make the class EntityFishingHook. Maybe there is something better. Then tell me, please. Anyway, with my current code the bobber is jumping when it is in the water and this looks strange. Then sometimes when i reopen the world i get a crash and have to generate a new one?! Hope you can help me making a custom fishing rod.
  8. Edit: My EntityFishingHook looks like this, now. EntityFishingHook removed I can catch animals with it, but can't fish. The bobber is jumping and sinking. This is weird. Is something wrong with my code or is it a render issue?
  9. Hello, I'm trying to make a custom fishing rod, but it doesn't work very well. With the item is everything ok, but with my EntityFishingHook class not. When i join a world i get a crash with these errors: removed Do you have an idea what I'm doing wrong?
  10. Hello, I'm trying to add new fishes that you can catch with a fishing rod. Does someone know how to do that while using the vanilla fishing rod? Or do I have to make a custom fishing rod? - Zcelo12
  11. Thanks. I did not know that shortcut.
  12. @chibil what do you mean with PR? @diesieben07 Thanks for your answer.
  13. Hello, i want to add items like peaches to the vanilla-leaves. So the leaves drop apples and peaches. Is there a block break method or a chance to do that? It would be great if you can help me.
  14. I found that function in InventoryBasic, too. But why it doesn't work?
  15. Thanks. I put this into my ContainerB.java , but i still can put the item into the container. public boolean isStackValidForSlot(int i, ItemStack itemstack) { int id = itemstack.itemID; if(id == Items.backpack.itemID) { return true; } return false; } My InventoryBackpack.java doesn't extend TileEntity. It extend InventoryBasic.
  16. I looked into ContainerWorkbench, ContainerFurnace, TileentityFurnace and Tileentityworkbench, but i can't find the solution for my problem.
  17. Hello, I made a container and everything works fine. Gui also. Now my problem is that i can put the container-item(right click opens the gui) into another container-item, if i have 2 of them. Is there a funtion to check if the item is the container, then i mustn't put the item ind the container. I hope you understand me
  18. Can someone help me with loading and saving the content? I tried somehting but i didn't work. removed
  19. Hello, it's me again. I've a small question. Where do I've to save the items with writeToNBT ? Loading the items at onItemRightClick, right?
  20. Ok, doesn't thought it was for items, too. I'll try it.
  21. Thanks. I read through the Internet and got it already a bit working. I can open a gui and place something in it. But what are the functions to save the Items, that are in the "Backpack", and load them? I don't use TileEntity anymore, cuz it's an item.
  22. Is there a tutorial, how to do that with items? I only found it with blocks, and have no idea, where to start. I've already changed the 0,0,0 in openGUI to the player position, but this can't work. I have to use NBT, i understand, but i need some information or a tutorial.
  23. Hello, at the moment i'm trying to do a itembackpack, which is like a chest, but you do not have to place it in the world. You craft a item and simply make right click to open a gui. But when i make right click nothing happens. removed In my mod_File i added: NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler()); I do not want to post the whole mod_File because there are many things i've added already for other items and blocks. Now i want to include a backpack. Hope someone can help me.
  24. I am the mod author I used .setUnlocalizedName for my Items and Blocks. For special Blocks like cake i used the method that was already given: @SideOnly(Side.CLIENT) public void func_94332_a(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("choco_cake_side"); this.field_94382_c = par1IconRegister.registerIcon("choco_cake_inner"); this.field_94383_a = par1IconRegister.registerIcon("choco_cake_top"); this.field_94381_b = par1IconRegister.registerIcon("choco_cake_bottom"); } I think that's the problem, because in 1.5 there wasn't a function registerIcon. (It was func_...) and everything worked. I think i did something wrong...
×
×
  • Create New...

Important Information

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