Jump to content

Bugzoo

Members
  • Posts

    268
  • Joined

  • Last visited

Everything posted by Bugzoo

  1. I know this is a pretty nooby question, but how would I do it, here is my code if(guibutton.id==12){ authenticatePin(enteredPin); } } private void authenticatePin (String pinCode) { EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; if (pinCode.equals(ItemDebitCard.checkCardPin(player))) { System.out.println("Correct Pin!"); player.openGui(FinancialMod.instance, 1, world, x, y, z) } else { System.out.println("They Dont MATCH!"); } }
  2. Ok, so what should I set the itemstack equal to? ItemStack itemstack = null; itemstack.stackTagCompound = new NBTTagCompound(); if(enteredPin.equals(itemstack.stackTagCompound.getString("pin"))){ System.out.println("The Right Pin!"); }
  3. Here is the whole class. I think that the itemstack might be null package com.bugzoo.FinancialMod; import java.io.IOException; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class ATMPinGUI extends GuiContainer{ public final int xSizeBackground1 = 232; public final int ySizeBackground1 = 240; private String enteredPin = ""; private String underScore = ""; private int tick = 0; public ItemStack itemstack; public final int guiX = (this.width - xSizeBackground1) / 2; public final int guiY = (this.height - xSizeBackground1) / 2; public ResourceLocation background1 = new ResourceLocation("financialmod", "textures/gui/ATM.png"); public ATMPinGUI(InventoryPlayer player, TileEntityATM atm){ super(new ContainerATM(player, atm)); } public void initGui(){ buttonList.clear(); buttonList.add(new ATMButton(1, guiLeft + 181, guiTop + 149, 24, 15, "1")); // 1 buttonList.add(new ATMButton(2, guiLeft + 213, guiTop + 149, 24, 15, "2")); // 2 buttonList.add(new ATMButton(3, guiLeft + 245, guiTop + 149, 24, 15, "3")); // 3 buttonList.add(new ATMRedButton(4, guiLeft + 281, guiTop + 149, 24, 15, "")); // Cancel buttonList.add(new ATMButton(5, guiLeft + 181, guiTop + 173, 24, 15, "4")); // 4 buttonList.add(new ATMButton(6, guiLeft + 213, guiTop + 173, 24, 15, "5")); // 5 buttonList.add(new ATMButton(7, guiLeft + 245, guiTop + 173, 24, 15, "6")); // 6 buttonList.add(new ATMYellowButton(8, guiLeft + 281, guiTop + 173, 24, 15, "")); // Clear buttonList.add(new ATMButton(9, guiLeft + 181, guiTop + 197, 24, 15, "7")); // 7 buttonList.add(new ATMButton(10, guiLeft + 213, guiTop + 197, 24, 15, "8")); // 8 buttonList.add(new ATMButton(11, guiLeft + 245, guiTop + 197, 24, 15, "9")); // 9 buttonList.add(new ATMConfirmButton(12, guiLeft + 281, guiTop + 197, 24, 15, "")); // Confirm buttonList.add(new ATMButton(13, guiLeft + 213, guiTop + 221, 24, 15, "0")); // 0 buttonList.add(new ATMLeftButton(14, guiLeft + 130, guiTop + 33, 24, 15, "")); //Top-Left buttonList.add(new ATMLeftButton(15, guiLeft + 130, guiTop + 60, 24, 15, "")); //Mid-Upper Left buttonList.add(new ATMLeftButton(16, guiLeft + 130, guiTop + 87, 24, 15, "")); //Mid-Lower Left buttonList.add(new ATMLeftButton(17, guiLeft + 130, guiTop + 114, 24, 15, "")); //Bottom Left buttonList.add(new ATMRightButton(18, guiLeft + 325, guiTop + 33, 24, 15, "")); //Top-Right buttonList.add(new ATMRightButton(19, guiLeft + 325, guiTop + 60, 24, 15, "")); //Mid-Upper Right buttonList.add(new ATMRightButton(20, guiLeft + 325, guiTop + 87, 24, 15, "")); //Mid-Lower Right buttonList.add(new ATMRightButton(21, guiLeft + 325, guiTop + 114, 24, 15, "")); //Bottom Right } public void actionPerformed(GuiButton guibutton){ if(guibutton.id==1){ enteredPin = enteredPin + "1"; System.out.println(enteredPin); } if(guibutton.id==2){ enteredPin = enteredPin + "2"; System.out.println(enteredPin); } if(guibutton.id==3){ enteredPin = enteredPin + "3"; System.out.println(enteredPin); } if(guibutton.id==4){ this.enteredPin = ""; } if(guibutton.id==5){ enteredPin = enteredPin + "4"; System.out.println(enteredPin); } if(guibutton.id==6){ enteredPin = enteredPin + "5"; System.out.println(enteredPin); } if(guibutton.id==7){ enteredPin = enteredPin + "6"; System.out.println(enteredPin); } if(guibutton.id=={ /*String URL = "https://www.google.co.uk/search?q=atm+screen&client=firefox-a&hs=KRv&rls=org.mozilla:en-GB:official&channel=np&tbm=isch&imgil=4qxgegDeEWCSaM%253A%253BMH8IbcHAhg9-3M%253Bhttps%25253A%25252F%25252Fsufiazamir.wordpress.com%25252Ftag%25252Fatm-screens%25252F&source=iu&pf=m&fir=4qxgegDeEWCSaM%253A%252CMH8IbcHAhg9-3M%252C_&usg=__0fIcaFRq-6p0shy1i8dW3VNWoa4%3D&biw=1536&bih=755&ved=0CC4Qyjc&ei=MRlWVPz-FOat7AaP04HwCw#facrc=_&imgdii=_&imgrc=Hxd6rXd8p_O0NM%253A%3B4r3sPIEVxepLfM%3Bhttp%253A%252F%252Fzesty.ca%252Flj%252Flusaka-atm-3.jpg%3Bhttp%253A%252F%252Fzestyping.livejournal.com%252F251102.html%3B400%3B300"; try { java.awt.Desktop.getDesktop().browse(java.net.URI.create(URL)); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } */ } if(guibutton.id==9){ enteredPin = enteredPin + "7"; System.out.println(enteredPin); } if(guibutton.id==10){ enteredPin = enteredPin + "8"; System.out.println(enteredPin); } if(guibutton.id==11){ enteredPin = enteredPin + "9"; System.out.println(enteredPin); } if(guibutton.id==12){ if(enteredPin.equals(itemstack.stackTagCompound.getString("pin"))){ } } } public boolean doesGuiPauseGame(){ return false; } public void drawScreen(int i, int j, float f){ //Background Texture GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(background1); int k1 = (this.width - this.xSizeBackground1) / 2; int l1 = (this.height - this.ySizeBackground1) / 2; this.drawTexturedModalRect(k1, l1, 0, 0, this.xSizeBackground1, this.ySizeBackground1); String underScore = ""; if (tick < 60) { tick++; } else if (tick >= 60) { tick = 0; } if (tick < 30) { underScore = "_"; } if (enteredPin.length() == 1) { drawString(fontRendererObj, "*" + underScore, width - 295, 90, 0xff00); } else if (enteredPin.length() == 2) { drawString(fontRendererObj, "**" + underScore, width - 295, 90, 0xff00); } else if (enteredPin.length() == 3) { drawString(fontRendererObj, "***" + underScore, width - 295, 90, 0xff00); } else if (enteredPin.length() >= 4) { drawString(fontRendererObj, "****" + underScore, width - 295, 90, 0xff00); } this.drawCenteredString(fontRendererObj, "Welcome!", width/2, 45, 0xff00); this.drawString(fontRendererObj, "Please Enter Your Pin", width - 295, 60, 0xff00); if(enteredPin.length() == 0){ this.drawString(fontRendererObj, underScore, width - 295, 90, 0xff00); } super.drawScreen(i, j, f); } @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { } }
  4. So, how would I get the pin into my gui class, I used this but it gave me a null pointer if(enteredPin.equals(itemstack.stackTagCompound.getString("pin")))
  5. So like this? itemStack.stackTagCompound = new NBTTagCompound(); itemStack.stackTagCompound.setString("owner", player.getDisplayName()); itemStack.stackTagCompound.setInteger("pin", 1000 + (int)(Math.random()*9999));
  6. I want to use the NBT I have made in one class, in another, how would I do this and here is my code NBT GUI
  7. I checked the button class and couldnt see anything wrong with it, but I decided to rewrite the whole thing and now it works
  8. Yea, i've tried changing the coordinates and the buttons just wont appear
  9. IChun has a tutorial, its not for 1.7 but I dont think much has changed in GL11 since then
  10. I already had it inn InitGui, I just moved it over to the draw screen method for testing purposes. That didn't change anything
  11. Your resource location is wrong, it is supposed to be private static final ResourceLocation texture = new ResourceLocation(MODID, "textures/entity/magic_Pro.png");
  12. Your using something that has no value
  13. I have a lot of buttons on my gui, but a quater of them wont show up, here is my Gui Class package com.bugzoo.FinancialMod; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class ATMPinGUI extends GuiContainer{ public final int xSizeBackground1 = 232; public final int ySizeBackground1 = 240; public final int guiX = (this.width - xSizeBackground1) / 2; public final int guiY = (this.height - xSizeBackground1) / 2; public ResourceLocation background1 = new ResourceLocation("financialmod", "textures/gui/ATM.png"); public ATMPinGUI(InventoryPlayer player, TileEntityATM atm){ super(new ContainerATM(player, atm)); } public void initGui(){ } public void actionPerformed(GuiButton guibutton){ } public boolean doesGuiPauseGame(){ return false; } public void drawScreen(int i, int j, float f){ buttonList.clear(); buttonList.add(new ATMButton(1, guiLeft + 171, guiTop + 109, 24, 15, "7")); // 7 buttonList.add(new ATMButton(2, guiLeft + 203, guiTop + 109, 24, 15, "8")); // 8 buttonList.add(new ATMButton(3, guiLeft + 235, guiTop + 109, 24, 15, "9")); // 9 buttonList.add(new ATMRedButton(4, guiLeft + 271, guiTop + 109, 24, 15, "")); // Cancel buttonList.add(new ATMButton(5, guiLeft + 171, guiTop + 133, 24, 15, "4")); // 4 buttonList.add(new ATMButton(6, guiLeft + 203, guiTop + 133, 24, 15, "5")); // 5 buttonList.add(new ATMButton(7, guiLeft + 235, guiTop + 133, 24, 15, "6")); // 6 buttonList.add(new ATMYellowButton(8, guiLeft + 271, guiTop + 133, 24, 15, "")); // Clear buttonList.add(new ATMButton(9, guiLeft + 171, guiTop + 157, 24, 15, "1")); // 1 buttonList.add(new ATMButton(10, guiLeft + 203, guiTop + 157, 24, 15, "2")); // 2 buttonList.add(new ATMButton(11, guiLeft + 235, guiTop + 157, 24, 15, "3")); // 3 buttonList.add(new ATMConfirmButton(12, guiLeft + 271, guiTop + 157, 24, 15, "")); // Confirm buttonList.add(new ATMButton(13, guiLeft + 203, guiTop + 181, 24, 15, "0")); // 0 buttonList.add(new ATMLeftButton(14, guiLeft + 130, guiTop + 23, 24, 15, "")); //Top-Left buttonList.add(new ATMLeftButton(15, guiLeft + 130, guiTop + 50, 24, 15, "")); //Mid-Upper Left buttonList.add(new ATMLeftButton(16, guiLeft + 130, guiTop + 77, 24, 15, "")); //Mid-Lower Left buttonList.add(new ATMLeftButton(17, guiLeft + 130, guiTop + 104, 24, 15, "")); //Bottom Left buttonList.add(new ATMRightButton(18, guiLeft + 282, guiTop + 23, 24, 15, "")); //Top-Right buttonList.add(new ATMRightButton(19, guiLeft + 282, guiTop + 50, 24, 15, "")); //Mid-Upper Right buttonList.add(new ATMRightButton(20, guiLeft + 282, guiTop + 77, 24, 15, "")); //Mid-Lower Right buttonList.add(new ATMRightButton(21, guiLeft + 282, guiTop + 104, 24, 15, "")); //Bottom Right //Background Texture GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(background1); int k1 = (this.width - this.xSizeBackground1) / 2; int l1 = (this.height - this.ySizeBackground1) / 2; this.drawTexturedModalRect(k1, l1, 0, 0, this.xSizeBackground1, this.ySizeBackground1); super.drawScreen(i, j, f); } @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { } }
  14. Done
  15. You installed the 1.6.4 version of "NotEnoughKeys"
  16. I'm getting an exception everytime I open my blocks GUI, here is the log and code GuiHandler Gui BlockClass BlockContainer [20:23:57] [main/INFO] [GradleStart]: No arguments specified, assuming client. [20:23:57] [main/INFO] [GradleStart]: Extra: [] [20:23:57] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --accessToken, {REDACTED}, --assetIndex, 1.7.10, --assetsDir, C:/Users/Daniel/.gradle/caches/minecraft/assets, --version, 1.7.10] [20:23:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [20:23:57] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [20:23:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [20:23:57] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1230 for Minecraft 1.7.10 loading [20:23:57] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.7.0_67, running on Windows 8.1:x86:6.3, installed at C:\Program Files (x86)\Java\jre7 [20:23:57] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [20:23:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [20:23:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [20:23:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [20:23:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [20:23:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [20:23:58] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [20:24:02] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [20:24:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [20:24:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [20:24:03] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [20:24:03] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [20:24:03] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [20:24:05] [main/INFO]: Setting user: Player359 [20:24:09] [Client thread/INFO]: LWJGL Version: 2.9.1 [20:24:10] [Client thread/INFO] [sTDOUT]: [tv.twitch.StandardCoreAPI:<init>:16]: If on Windows, make sure to provide all of the necessary dll's as specified in the twitchsdk README. Also, make sure to set the PATH environment variable to point to the directory containing the dll's. [20:24:10] [Client thread/ERROR]: Couldn't initialize twitch stream [20:24:11] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [20:24:11] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1230 Initialized [20:24:11] [Client thread/INFO] [FML]: Replaced 182 ore recipies [20:24:11] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [20:24:12] [Client thread/INFO] [FML]: Searching C:\Users\Daniel\Documents\Brain Bang\Coding\Minecraft Modding\New Mods\1.7.10\1.7.10 Bugzoos Financial Mod\eclipse\mods for mods [20:24:12] [Client thread/INFO] [FinancialMod]: Mod FinancialMod is missing the required element 'name'. Substituting FinancialMod [20:24:19] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [20:24:20] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, FinancialMod] at CLIENT [20:24:20] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, FinancialMod] at SERVER [20:24:21] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:FinancialMod [20:24:21] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [20:24:21] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [20:24:21] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [20:24:21] [Client thread/INFO] [FML]: Applying holder lookups [20:24:21] [Client thread/INFO] [FML]: Holder lookups applied [20:24:22] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [20:24:22] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem... [20:24:22] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [20:24:22] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [20:24:22] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [20:24:22] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [20:24:22] [sound Library Loader/INFO]: Sound engine started [20:24:27] [Client thread/ERROR]: Using missing texture, unable to load financialmod:textures/blocks/ATM.png java.io.FileNotFoundException: financialmod:textures/blocks/ATM.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:582) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at GradleStart.bounce(GradleStart.java:107) [start/:?] at GradleStart.startClient(GradleStart.java:100) [start/:?] at GradleStart.main(GradleStart.java:55) [start/:?] [20:24:27] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [20:24:28] [Client thread/ERROR]: Using missing texture, unable to load financialmod:textures/items/Wallet.png java.io.FileNotFoundException: financialmod:textures/items/Wallet.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:583) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at GradleStart.bounce(GradleStart.java:107) [start/:?] at GradleStart.startClient(GradleStart.java:100) [start/:?] at GradleStart.main(GradleStart.java:55) [start/:?] [20:24:28] [Client thread/INFO]: Created: 256x256 textures/items-atlas [20:24:28] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [20:24:28] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:FinancialMod [20:24:28] [Client thread/ERROR]: Using missing texture, unable to load financialmod:textures/items/Wallet.png java.io.FileNotFoundException: financialmod:textures/items/Wallet.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at GradleStart.bounce(GradleStart.java:107) [start/:?] at GradleStart.startClient(GradleStart.java:100) [start/:?] at GradleStart.main(GradleStart.java:55) [start/:?] [20:24:28] [Client thread/INFO]: Created: 256x256 textures/items-atlas [20:24:28] [Client thread/ERROR]: Using missing texture, unable to load financialmod:textures/blocks/ATM.png java.io.FileNotFoundException: financialmod:textures/blocks/ATM.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67] at GradleStart.bounce(GradleStart.java:107) [start/:?] at GradleStart.startClient(GradleStart.java:100) [start/:?] at GradleStart.main(GradleStart.java:55) [start/:?] [20:24:29] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [20:24:29] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [20:24:29] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down... [20:24:29] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [20:24:29] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [20:24:29] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [20:24:29] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem... [20:24:30] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [20:24:30] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [20:24:30] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [20:24:30] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [20:24:30] [sound Library Loader/INFO]: Sound engine started [20:24:45] [server thread/INFO]: Starting integrated minecraft server version 1.7.10 [20:24:45] [server thread/INFO]: Generating keypair [20:24:46] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance [20:24:46] [server thread/INFO] [FML]: Applying holder lookups [20:24:46] [server thread/INFO] [FML]: Holder lookups applied [20:24:47] [server thread/INFO] [FML]: Loading dimension 0 (Bugzoo's World) (net.minecraft.server.integrated.IntegratedServer@6a151b) [20:24:47] [server thread/INFO] [FML]: Loading dimension 1 (Bugzoo's World) (net.minecraft.server.integrated.IntegratedServer@6a151b) [20:24:47] [server thread/INFO] [FML]: Loading dimension -1 (Bugzoo's World) (net.minecraft.server.integrated.IntegratedServer@6a151b) [20:24:47] [server thread/INFO]: Preparing start region for level 0 [20:24:48] [server thread/INFO]: Preparing spawn area: 19% [20:24:49] [server thread/INFO]: Preparing spawn area: 56% [20:24:50] [server thread/INFO]: Preparing spawn area: 83% [20:24:51] [server thread/INFO]: Changing view distance to 8, from 10 [20:24:52] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [20:24:52] [Netty IO #1/INFO] [FML]: Client protocol version 1 [20:24:52] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : [email protected],[email protected],[email protected],[email protected] [20:24:52] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [20:24:52] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [20:24:52] [server thread/INFO] [FML]: [server thread] Server side modded connection established [20:24:52] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [20:24:52] [server thread/INFO]: Player359[local:E:ebe46215] logged in with entity id 290 at (37.711451117392826, 65.0, 313.0375150114785) [20:24:52] [server thread/INFO]: Player359 joined the game [20:24:54] [server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2585ms behind, skipping 51 tick(s) [20:24:56] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Ticking memory connection at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Caused by: java.lang.NullPointerException at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:657) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) ~[C08PacketPlayerBlockPlacement.class:?] at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) ~[C08PacketPlayerBlockPlacement.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?] ... 5 more [20:24:56] [server thread/ERROR]: This crash report has been saved to: C:\Users\Daniel\Documents\Brain Bang\Coding\Minecraft Modding\New Mods\1.7.10\1.7.10 Bugzoos Financial Mod\eclipse\.\crash-reports\crash-2014-11-01_20.24.56-server.txt [20:24:56] [server thread/INFO]: Stopping server [20:24:56] [server thread/INFO]: Saving players [20:24:56] [Client thread/INFO]: [CHAT] Welcome, Player359 To Minebank [20:24:56] [server thread/INFO]: Saving worlds [20:24:56] [server thread/INFO]: Saving chunks for level 'Bugzoo's World'/Overworld [20:24:56] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ---- // On the bright side, I bought you a teddy bear! Time: 01/11/14 20:24 Description: Ticking memory connection java.lang.NullPointerException: Ticking memory connection at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:657) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:657) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) -- Ticking connection -- Details: Connection: net.minecraft.network.NetworkManager@1e57605 Stacktrace: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (x86) version 6.3 Java Version: 1.7.0_67, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 809329080 bytes (771 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FinancialMod{1.0} [FinancialMod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player359'/290, l='Bugzoo's World', x=37.71, y=65.00, z=313.04]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [20:24:56] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-11-01_20.24.56-server.txt [20:24:56] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [20:24:56] [server thread/INFO]: Saving chunks for level 'Bugzoo's World'/Nether [20:24:56] [server thread/INFO]: Saving chunks for level 'Bugzoo's World'/The End [20:24:58] [server thread/INFO] [FML]: Unloading dimension 0 [20:24:58] [server thread/INFO] [FML]: Unloading dimension -1 [20:24:58] [server thread/INFO] [FML]: Unloading dimension 1 [20:24:58] [server thread/INFO] [FML]: Applying holder lookups [20:24:58] [server thread/INFO] [FML]: Holder lookups applied [20:24:58] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [20:24:58] [Client thread/INFO] [FML]: Server terminated. AL lib: (EE) alc_cleanup: 1 device not closed
  17. Ok, so I already have it set-up with NBT, but it is the same on all the items, what am I doing wrong package com.bugzoo.FinancialMod; import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; public class ItemDebitCard extends Item { public ItemDebitCard(){ setMaxStackSize(1); setUnlocalizedName("DebitCard"); setCreativeTab(FinancialMod.financialTab); } int UniquePin = 1000 + (int)(Math.random()*9999); public static double balance; @Override public void onCreated(ItemStack itemStack, World world, EntityPlayer player) { itemStack.stackTagCompound = new NBTTagCompound(); itemStack.stackTagCompound.setString("owner", player.getDisplayName()); itemStack.stackTagCompound.setInteger("pin", UniquePin); itemStack.stackTagCompound.setDouble("balance", balance); if(!world.isRemote){ player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Your Unique Pin is " + UniquePin)); } } public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) { if (itemStack.stackTagCompound != null) { String owner = itemStack.stackTagCompound.getString("owner"); String pin = itemStack.stackTagCompound.getString("pin"); list.add("Owner: " + owner); list.add("Balance: " + balance); if (!owner.equals(player.getDisplayName())) { list.add("Pin: " + EnumChatFormatting.OBFUSCATED + pin); } else { list.add("Pin: " + pin); } } } }
  18. How would I do this?
  19. I'm creating a balance for an item, and everytime you add money to that balance, the balance variable goes up. But the problem is that the balance is the same for all the items. So if I added $100 to an item, it would add to everybody elses items aswell. I hope I explained it right
  20. I want to make a custom chest, but it opens when I right click on an Item, how would I do this?
  21. Thanks, that worked
  22. I try to send a message to the player, but it sends it twice. player.addChatComponentMessage(new ChatComponentText("Your Unique Pin is " + UniquePin));
  23. if you use getDisplayName your Item will store a snapshot of the current name. It can change in future versions of Minecraft. And when the name change addition gets made, I will update the code
  24. I wanted to get the ingame name, I guess I just didn't explain it right
  25. I got it, I should have just done .getDisplayName()
×
×
  • Create New...

Important Information

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