Jump to content

UberAffe

Forge Modder
  • Posts

    316
  • Joined

  • Last visited

Everything posted by UberAffe

  1. GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glPushMatrix(); GL11.glColor4f((float)RGB[0]/255, (float)RGB[1]/255, (float)RGB[2]/255, .6f); int top = BAR_SPACING + (iteration * (BAR_SPACING + BAR_HEIGHT)); int left = BAR_SPACING; GL11.glBegin(GL11.GL_LINE_LOOP); { GL11.glVertex2i(left, top); GL11.glVertex2i(left + BAR_WIDTH, top); GL11.glVertex2i(left + BAR_WIDTH, top + BAR_HEIGHT); GL11.glVertex2i(left, top + BAR_HEIGHT); } GL11.glEnd(); GL11.glColor4f((float)RGB[0]/255, (float)RGB[1]/255, (float)RGB[2]/255, .8f); GL11.glBegin(GL11.GL_QUADS); { int right = left + (int)(new Float(BAR_WIDTH) / percent); GL11.glVertex2i(left, top); GL11.glVertex2i(right, top); GL11.glVertex2i(right, top + BAR_HEIGHT); GL11.glVertex2i(left, top + BAR_HEIGHT); } GL11.glEnd(); GL11.glPopMatrix(); GL11.glPopAttrib(); I am trying to draw an open rectangle and then fill in a percent of it. As is this code draws the rectangle but doesn't fill it. If I switch around the vertices in the second part to this: GL11.glVertex2i(left, top); GL11.glVertex2i(right, top); GL11.glVertex2i(left, top + BAR_HEIGHT); GL11.glVertex2i(right, top + BAR_HEIGHT); I fills in a triangle using the right side and the bottom left corner. Any idea what I need to do to get it to fill a rectangle?
  2. Thanks, this should be exactly what I need.
  3. I am making a magic mod and like many others I want to display the amount available on the users hud. I have been trying to go through Ars Magicka's github to figure out how they did it but I am either not finding it, or just not understanding what I am looking at. I am was also looking at this for how to actually add to player extended properties but I feel like there should be some kind of registration for it that I am missing. Any help is appreciated.
  4. @jeffryfisher: I though markDirty was just to update the client with changes on the server? @Draco18s: If it is just a dictionary then I am confused as to why my original bit of code wouldn't work. //RefString values are formatted as "{modid}_{variableName}" public void writeToNBT(NBTTagCompound nbt) { NBTTagCompound temp; for(int i = 0; i < inventory.length(); i++) { temp = new NBTTagCompound(); inventory[i].writeToNBT(temp); nbt.setTag(RefStrings.Inventory + i, temp); } When I had everything set up like that it still wouldn't save, even looking at the region file it doesn't show any tile entity in that location. Even if entries are getting overwritten something should still show up shouldn't it?
  5. So you can only have one NBTTagCompound or NBTTagList per nest level? I switched up my read and write to make use of NBTTagList but it still doesn't save the inventory. But it still doesn't seem to be saving. I took a look at the region file in NBTExplorer and it doesn't list any tile entities at that block location. Is there something I need to do to outside of my TileEntity file to make writeToNBT get called during save?
  6. I can add armor to the inventory fine and stays while the world is loaded but after closing and reopening the items are lost. Can someone take a look at my readFrom/writeToNBT methods and point out what I am doing wrong. Github Link line 73 for read and line 108 for write the inventory portions are at 90 and 123 Forewarning: I am probably trying to throw a lot more into the save than is necessary.
  7. why would you create your own effect if you cant use vanillas? simply make some simple if checks to find out if the effect is alive for nuf seconds to heal and then reapply it.. Assuming you mean "if you can use vanillas", he already has it working to apply the regen, he just wants a way to have potion effect icon in the player inventory always show 0 seconds. Because regen applies the heal on timeLeft %10 = 1 he can't have it show 0 seconds and still heal the player. Making your own effect is for people who are too picky to just accept that it won't display, exactly as they want.
  8. based on how that potion effect works (heals at 1/11/21 seconds) I would say no unless you modified base minecraft code, which would make your mod incompatible with most others. That being said, you could make your own effect that heals a player and use that instead of regen.
  9. Well, it made the jar ... so I guess that's something I'll have to keep in mind while troubleshooting build issues.
  10. I made a new folder and transferred the gradle files, ran gradlew setupdecompworkspace, then copied the src folder and libs folder over ran gradlew build --info and it created the jar. Can I just run gradlew setupdecompworkspace in the original folder again to fix it? This is the output from build: Starting Build Settings evaluated using empty settings script. Projects loaded. Root project using build file 'F:\Minecraft Mods\test\build.gradle'. Included projects: [root project 'test'] Evaluating root project 'test' using build file 'F:\Minecraft Mods\test\build.gradle'. **************************** Powered By MCP: http://modcoderpack.com/ Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs MCP Data version : unknown **************************** All projects evaluated. Selected primary task 'DefaultTaskParameter{taskName='build',projectPath='null'}' Tasks to be executed: [task ':compileApiJava', task ':processApiResources', task ':apiClasses', task ':sourceMainJava', task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test', task ':extractMcpData', task ':getVersionJson', task ':extractUserDev', task ':genSrgs', task ':reobf', task ':assemble', task ':check', task ':build'] :compileApiJava (Thread[main,5,main]) started. :compileApiJava Skipping task ':compileApiJava' as it has no source files. :compileApiJava UP-TO-DATE :compileApiJava (Thread[main,5,main]) completed. Took 0.012 secs. :processApiResources (Thread[main,5,main]) started. :processApiResources Skipping task ':processApiResources' as it has no source files. :processApiResources UP-TO-DATE :processApiResources (Thread[main,5,main]) completed. Took 0.0 secs. :apiClasses (Thread[main,5,main]) started. :apiClasses Skipping task ':apiClasses' as it has no actions. :apiClasses UP-TO-DATE :apiClasses (Thread[main,5,main]) completed. Took 0.001 secs. :sourceMainJava (Thread[main,5,main]) started. :sourceMainJava Executing task ':sourceMainJava' (up-to-date check took 0.069 secs) due to: No history is available. :sourceMainJava (Thread[main,5,main]) completed. Took 0.141 secs. :compileJava (Thread[main,5,main]) started. :compileJava Resource missing. [HTTP GET: http://files.minecraftforge.net/maven//forgeSrc/1.7.10-10.13.4.1481-1.7.10/forgeSrc-1.7.10-10.13.4.1481-1.7.10.pom] Resource missing. [HTTP HEAD: http://files.minecraftforge.net/maven//forgeSrc/1.7.10-10.13.4.1481-1.7.10/forgeSrc-1.7.10-10.13.4.1481-1.7.10.jar] Resource missing. [HTTP GET: http://repo1.maven.org/maven2//forgeSrc/1.7.10-10.13.4.1481-1.7.10/forgeSrc-1.7.10-10.13.4.1481-1.7.10.pom] Resource missing. [HTTP HEAD: http://repo1.maven.org/maven2//forgeSrc/1.7.10-10.13.4.1481-1.7.10/forgeSrc-1.7.10-10.13.4.1481-1.7.10.jar] Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net//forgeSrc/1.7.10-10.13.4.1481-1.7.10/forgeSrc-1.7.10-10.13.4.1481-1.7.10.pom] Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net/org/scala-lang/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.pom] Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.pom] Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.pom] Executing task ':compileJava' (up-to-date check took 1.68 secs) due to: No history is available. All input files are considered out-of-date for incremental task ':compileJava'. Compiling with JDK Java compiler API. :compileJava (Thread[main,5,main]) completed. Took 2.462 secs. :processResources (Thread[main,5,main]) started. :processResources Executing task ':processResources' (up-to-date check took 0.016 secs) due to: No history is available. :processResources (Thread[main,5,main]) completed. Took 0.212 secs. :classes (Thread[main,5,main]) started. :classes Skipping task ':classes' as it has no actions. :classes (Thread[main,5,main]) completed. Took 0.001 secs. :jar (Thread[main,5,main]) started. :jar Executing task ':jar' (up-to-date check took 0.011 secs) due to: No history is available. :jar (Thread[main,5,main]) completed. Took 0.054 secs. :compileTestJava (Thread[main,5,main]) started. :compileTestJava Skipping task ':compileTestJava' as it has no source files. :compileTestJava UP-TO-DATE :compileTestJava (Thread[main,5,main]) completed. Took 0.0 secs. :processTestResources (Thread[main,5,main]) started. :processTestResources Skipping task ':processTestResources' as it has no source files. :processTestResources UP-TO-DATE :processTestResources (Thread[main,5,main]) completed. Took 0.001 secs. :testClasses (Thread[main,5,main]) started. :testClasses Skipping task ':testClasses' as it has no actions. :testClasses UP-TO-DATE :testClasses (Thread[main,5,main]) completed. Took 0.0 secs. :test (Thread[main,5,main]) started. :test file or directory 'F:\Minecraft Mods\test\build\classes\test', not found Skipping task ':test' as it has no source files. :test UP-TO-DATE :test (Thread[main,5,main]) completed. Took 0.001 secs. :extractMcpData (Thread[main,5,main]) started. :extractMcpData Skipping task ':extractMcpData' as it is up-to-date (took 0.005 secs). :extractMcpData UP-TO-DATE :extractMcpData (Thread[main,5,main]) completed. Took 0.005 secs. :getVersionJson (Thread[main,5,main]) started. :getVersionJson Executing task ':getVersionJson' (up-to-date check took 0.001 secs) due to: Task has not declared any outputs. :getVersionJson (Thread[main,5,main]) completed. Took 0.305 secs. :extractUserDev (Thread[main,5,main]) started. :extractUserDev Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net/net/minecraftforge/forge/1.7.10-10.13.4.1481-1.7.10/forge-1.7.10-10.13.4.1481-1.7.10.pom] Skipping task ':extractUserDev' as it is up-to-date (took 0.218 secs). :extractUserDev UP-TO-DATE :extractUserDev (Thread[main,5,main]) completed. Took 0.218 secs. :genSrgs (Thread[main,5,main]) started. :genSrgs Skipping task ':genSrgs' as task onlyIf is false. :genSrgs SKIPPED :genSrgs (Thread[main,5,main]) completed. Took 0.227 secs. :reobf (Thread[main,5,main]) started. :reobf Executing task ':reobf' (up-to-date check took 0.003 secs) due to: No history is available. :reobf (Thread[main,5,main]) completed. Took 0.834 secs. :assemble (Thread[main,5,main]) started. :assemble Skipping task ':assemble' as it has no actions. :assemble (Thread[main,5,main]) completed. Took 0.0 secs. :check (Thread[main,5,main]) started. :check Skipping task ':check' as it has no actions. :check UP-TO-DATE :check (Thread[main,5,main]) completed. Took 0.0 secs. :build (Thread[main,5,main]) started. :build Skipping task ':build' as it has no actions. :build (Thread[main,5,main]) completed. Took 0.0 secs. BUILD SUCCESSFUL Total time: 7.882 secs Stopped 0 compiler daemon(s).
  11. Thanks, that fixed it!
  12. Still learning about what is necessary and what isn't, but build.gradle is there now.
  13. I haven't worked with item interactions like that, but it seems like your item isn't actually triggering the event. Try taking a look at ItemLead in net.minecraft.item, onItemUse() and func_150909_a()
  14. updated question
  15. put another if statement before you apply the potion effect that checks player.isPotionActive(regen)
  16. 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@5657aed1 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 (amd64) version 6.3 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 617949168 bytes (589 MB) / 1476395008 bytes (1408 MB) up to 3806855168 bytes (3630 MB) JVM Flags: 0 total; AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1481 14 mods loaded, 14 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1481-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1481} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1481-1.7.10.jar) UCHIJAAAA CodeChickenCore{1.0.7.47} [CodeChicken Core] (minecraft.jar) UCHIJAAAA NotEnoughItems{1.0.5.118} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.5.118-universal.jar) UCHIJAAAA <CoFH ASM>{000} [CoFH ASM] (minecraft.jar) UCHIJAAAA armerger{0.1} [Armerger] (bin) UCHIJAAAA Baubles{1.0.1.10} [baubles] (Baubles-deobf-1.7.10-1.0.1.10.jar) UCHIJAAAA CoFHCore{1.7.10R3.1.1} [CoFH Core] (CoFHCore-[1.7.10]3.1.1-324.jar) UCHIJAAAA BrandonsCore{1.0.0.10} [brandon's Core] (BrandonsCore-1.0.0.10-bugfix.jar) UCHIJAAAA ThermalFoundation{1.7.10R1.2.2} [Thermal Foundation] (ThermalFoundation-[1.7.10]1.2.2-111.jar) UCHIJAAAA ThermalExpansion{1.7.10R4.1.1} [Thermal Expansion] (ThermalExpansion-[1.7.10]4.1.1-237.jar) UCHIJAAAA DraconicEvolution{1.0.2-snapshot_9} [Draconic Evolution] (Draconic-Evolution-1.7.10-1.0.2-Snapshot_9.jar) UCHIJAAAA ThermalDynamics{1.7.10R1.1.0} [Thermal Dynamics] (ThermalDynamics-[1.7.10]1.1.0-161.jar) GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. CoFHCore: -[1.7.10]3.1.1-324 ThermalFoundation: -[1.7.10]1.2.2-111 ThermalExpansion: -[1.7.10]4.1.1-237 ThermalDynamics: -[1.7.10]1.1.0-161 This is the crash report I am getting when I try to open my gui in-game. The gui does display for a moment, albeit improperly, before crashing. I followed the steps in this guide to create my gui.there were only a couple minor changes to function calls to match my forge version. you can look at my code here.
  17. Updated op with more information
  18. Where do you have it/What do you have in it/What isn't behaving as expected?
  19. Solution: For anyone that has an issue like this just run "gradlew setupdecompworkspace" from your project location. You should be able to build your project after that. Solution: When I run gradlew build --info this is the output Starting Build Settings evaluated using empty settings script. Projects loaded. Root project using build file 'F:\Minecraft Mods\Armerger\build.gradle'. Included projects: [root project 'Armerger'] Evaluating root project 'Armerger' using build file 'F:\Minecraft Mods\Armerger\build.gradle'. **************************** Powered By MCP: http://modcoderpack.com/ Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs MCP Data version : unknown **************************** All projects evaluated. Selected primary task 'DefaultTaskParameter{taskName='build',projectPath='null'}' Tasks to be executed: [task ':compileApiJava', task ':processApiResources', task ':apiClasses', task ':sourceMainJava', task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test', task ':extractMcpData', task ':getVersionJson', task ':extractUserDev', task ':genSrgs', task ':reobf', task ':assemble', task ':check', task ':build'] :compileApiJava (Thread[main,5,main]) started. :compileApiJava Skipping task ':compileApiJava' as it has no source files. :compileApiJava UP-TO-DATE :compileApiJava (Thread[main,5,main]) completed. Took 0.01 secs. :processApiResources (Thread[main,5,main]) started. :processApiResources Skipping task ':processApiResources' as it has no source files. :processApiResources UP-TO-DATE :processApiResources (Thread[main,5,main]) completed. Took 0.001 secs. :apiClasses (Thread[main,5,main]) started. :apiClasses Skipping task ':apiClasses' as it has no actions. :apiClasses UP-TO-DATE :apiClasses (Thread[main,5,main]) completed. Took 0.0 secs. :sourceMainJava (Thread[main,5,main]) started. :sourceMainJava Skipping task ':sourceMainJava' as it is up-to-date (took 0.023 secs). :sourceMainJava UP-TO-DATE :sourceMainJava (Thread[main,5,main]) completed. Took 0.024 secs. :compileJava (Thread[main,5,main]) started. :compileJava Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net//forgeSrc/1.7.10-10.13.4.1481-1.7.10/forgeSrc-1.7.10-10.13.4.1481-1.7.10.pom] Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net/org/scala-lang/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.pom] Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.pom] Failed to get resource: GET. [HTTP HTTP/1.1 403 Forbidden: https://libraries.minecraft.net/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.pom] Executing task ':compileJava' (up-to-date check took 0.927 secs) due to: No history is available. All input files are considered out-of-date for incremental task ':compileJava'. Compiling with JDK Java compiler API. :compileJava FAILED :compileJava (Thread[main,5,main]) completed. Took 1.028 secs. BUILD FAILED Total time: 4.024 secs Stopped 0 compiler daemon(s). I did my initial setup in win8.1 and at the time I was able to build my project, I am now in win10. I have added the JAVA_HOME Env. Var. and javac -version is reporting the expected version (1.8u45) You can see the folder structure in this Github Any help would be appreciated. Edit 1: Tried building another project and that one is working, as far as I can tell they have the exact same gradle setup. You can see the folder structure in this Github Edit 2: I am able to run the mod from within eclipse and everything shows up, but still can't build it. If you need other information just ask. Edit 3: Updated the output from attempting to build New question: Are these necessary to build and if not how to I remove them from the build path? https://libraries.minecraft.net//forgeSrc/1.7.10-10.13.4.1481-1.7.10/forgeSrc-1.7.10-10.13.4.1481-1.7.10.pom] https://libraries.minecraft.net/org/scala-lang/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.pom] https://libraries.minecraft.net/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.pom] https://libraries.minecraft.net/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.pom]
  20. I don't know the size, but I would assume there is one. A better question is what are you doing that might be hitting that limit? There is probably a simpler way.
  21. Not sure about the lack of generation but it is possible to use too much ram, Minecraft runs better if it has a robust Garbage Collection running, otherwise nothing will get unloaded. 2-3GB is the general consensus for the best amount to use. It's possible that that is related to the generation problem but not likely.
  22. Simply put, 170 mods is a LARGE modpack and it is not going to run smoothly. That said you could get a really nice dedicated server and possible a better GPU and you might have something that plays well. You also have a fair number of World Gen/ biome mods and those WILL slow down performance. Minecraft isn't optimized well to handle that kind of stuff.
  23. "news" not release. As far as I can tell 1.9 is still going to be available just like older versions even though MS is releasing it, So I am asking if there is any news related to forge and 1.9
  24. You can set them larger than that but minecraft doesn't like it.
×
×
  • Create New...

Important Information

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