Everything posted by Zcelo12
-
Minecraft Forge Installation
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.
-
[1.6.2]need help with custon arrows [Solved]
You also have to register your Entity, if you haven't. EntityRegistry.registerGlobalEntityID(YourArrow.class, "Your Arrow", 212);
-
UpdateCheck with .txt File
I'm using IPlayerTracker for that. The problem is when I add that to OnPlayerLogin, nothing happens: new UpdateCheck();
-
UpdateCheck with .txt File
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) ?
-
UpdateCheck with .txt File
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?
-
Problem creating custom fishing rod.
Thanks to all, it din't work so I found a work-arround my way.
-
Problem creating custom fishing rod.
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.
-
Problem creating custom fishing rod.
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?
-
Problem creating custom fishing rod.
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?
-
Question about EntityFishHook.
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
-
Add drops to vanilla-leaves
Thanks. I did not know that shortcut.
-
Add drops to vanilla-leaves
@chibil what do you mean with PR? @diesieben07 Thanks for your answer.
-
Add drops to vanilla-leaves
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.
-
Container: Function to check if Item is a specified Item
I found that function in InventoryBasic, too. But why it doesn't work?
-
Container: Function to check if Item is a specified Item
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.
-
Container: Function to check if Item is a specified Item
I looked into ContainerWorkbench, ContainerFurnace, TileentityFurnace and Tileentityworkbench, but i can't find the solution for my problem.
-
Container: Function to check if Item is a specified Item
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
-
[NBT]How to save and load items?
Can someone help me with loading and saving the content? I tried somehting but i didn't work. removed
-
[NBT]How to save and load items?
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?
-
[NBT]How to save and load items?
Ok, doesn't thought it was for items, too. I'll try it.
-
[NBT]How to save and load items?
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.
-
[NBT]How to save and load items?
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.
-
[NBT]How to save and load items?
Has someone an ideal?
-
[NBT]How to save and load items?
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.
-
Getting Error: NullPointerException
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...
IPS spam blocked by CleanTalk.