-
Posts
69 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Sinhika
-
Thank you very much, the both of you, for helping to solve this problem.
-
Advice wanted. So: one can subclass ShearItem and make an adequate custom shear item that will shear sheep just fine. The problem is, it won't cut leaf blocks like minecraft:shears will. I did a bit of spelunking in the code and loot tables, and found that leaves being obtainable by breaking with shears is specified in the loot-table for each leaf block, by tool name (e.g. "minecraft:shears"). Because of this questionable design decision, the only way I can see to make custom shears work is to somehow iterate over all the vanilla loot-tables for each and every leaf type and add my custom shears (plural) to the list of tools that make leaves drop. First, is there a way to do this programmatically? I'm pretty sure it has changed since 1.12, everything else has. Second, how does one replace vanilla loot tables? Finally, any general advice on the best way to solve this problem?
-
I'm just adding a "me, too", as I am attempting to port the SimpleOres mod.
-
Need working examples of IItemHandler-based furnace or machine to study
Sinhika replied to Sinhika's topic in Modder Support
I presume this is all in the tile entity class? So how do you correctly update the GUI to show cooking progress, etc? -
Need working examples of IItemHandler-based furnace or machine to study
Sinhika replied to Sinhika's topic in Modder Support
Well, I did want to avoid inflicting all that code on you, but if you're willing to give it a look: The device in question is the Nether Furnace in Netherrocks: https://github.com/Sinhika/Netherrocks Nether Furnace classes: Block - https://github.com/Sinhika/Netherrocks/blob/1.12/src/main/java/alexndr/plugins/netherrocks/blocks/NetherFurnaceBlock.java Container and Slots - https://github.com/Sinhika/Netherrocks/tree/1.12/src/main/java/alexndr/plugins/netherrocks/inventory GUI - https://github.com/Sinhika/Netherrocks/blob/1.12/src/main/java/alexndr/plugins/netherrocks/gui/NetherFurnaceGui.java Tile Entity - https://github.com/Sinhika/Netherrocks/blob/1.12/src/main/java/alexndr/plugins/netherrocks/tiles/NetherFurnaceTileEntity.java Ancestral classes are in the SimpleCore library, general source at: https://github.com/Sinhika/SimpleCore Mostly, you'll probably find what you are looking for in https://github.com/Sinhika/SimpleCore/tree/1.12/src/main/java/alexndr/api/content Version 1.12.2 if it wasn't obvious. I've been compiling against the current stable version of Forge, 14.23.4.2705 . If there's an important fix in a later version that I should move to, please let me know. -
I've been trying to implement a custom furnace that uses IItemHandler instead of IInventory as the latter is deprecated, and getting stuck on the client-server (tile-entity <-> GUI) sync. After a certain point it just fails to work, and not only does my custom furnace-thing stop working, vanilla furnaces stop working! Makes me wonder if I'm somehow crashing the block update mechanism or the tick handling. I'd like to figure this one out myself, but the vanilla furnace isn't a good example as it is still ISidedInventory-based, and the open-source mods with furnace-like machines are very complex and have the working details split between layers of inherited classes and handler classes that make it a pain to figure out what is going on by studying the code. So, anyone have any simple, yet successfully working examples of IItemHandler-based machines with slots, GUI, and stuff happening over time that I can study to figure out what SHOULD be going on?
-
Legacy name. I took over from the original developer after he left Minecraft modding and moved on to other games. Further note: hold off on solving this. I'm rewriting all the furnace code to properly use capabilities instead of just the IInventory wrapper. I'm finding out that IItemHandler lets me simplify a lot of the existing code. Code base is in flux.
-
Summary: ClassNotFoundException keeps getting thrown for class that is RIGHT THERE, what am I missing? Links to "Resources": Crash log: https://gist.github.com/Sinhika/17643fead0c2295fbe3cab43a010968d SimpleCore API GitHub: https://github.com/Sinhika/SimpleCore Netherrocks GitHub: https://github.com/Sinhika/Netherrocks Background: I am porting the SimpleOres complex of mods to Minecraft/Forge 1.12.2. I had successfully ported the common library used by all of the related mods (SimpleCore API), or so I thought. I have successfully ported Simple Ores 2, which is quite simple, and all of it appears to be working: ore generation, recipes, advancements, weapons, tools, armor, etc. However, I have not been so lucky with the next mod on the list, Netherrocks. Problem Description: I am now porting "Netherrocks"; Netherrocks adds armor with special effects, weapons with special effects, and a tile entity machine. The latter is what appears to be failing for no explicable reason. At first, I simply could not get the NetherFurnaceBlock to initialize, but I finally isolated the problem to the related tile entity: NetherFurnaceTileEntity. For no obvious reason that I can see, the class loader refuses to believe the class exists. It blows up when new NetherFurnaceTileEntity(..) is invoked, and getting the Class object to register also fails to find it. Even specifying the full path to the class in ProxyCommon.registerBlocks() fails. I've beating my head against this brick wall for several days now, and am getting very frustrated. Note that there is cross-mod inheritance: NetherFurnaceTileEntity extends SimpleFurnaceTileEntity from the SimpleCore API. I recently updated the Forge version I was building against and the snapshots it was using to make sure everything was using the same MCP mapping. When run under the debugger with the de-obfuscated jars, I get the same error, so I don't believe it's a cross-mod obfuscation issue. I may be mistaken in this. What I am hoping you can do: 1. Point out whatever obvious Java mistake I made and am overlooking so I can fix it. More eyes makes bugs shallower. 2. Alternatively, point out whatever obscure build path error I made so I can fix it. 3. Alternatively, discover that Forge has a weird bug that needs fixing, and fix it.
-
[1.12] How to put Recipe in specific recipe book tab?
Sinhika replied to Sinhika's topic in Modder Support
I agree. I doubt that I am the only modder who likes their mod items neatly organized, whether it's in custom creative tabs or this new recipe book thing. -
[1.12] How to put Recipe in specific recipe book tab?
Sinhika replied to Sinhika's topic in Modder Support
Draco18s is correct. I am referring to the shiny new vanilla Recipe Book, introduced in 1.12 or so. -
I know this question has been asked before, but I haven't been able to find a useful/confirmed answer. 1. When a recipe is added to the Minecraft recipe book, how do you make it go to a particular tab? e.g. at present, all my modded tool recipes go into the miscellaneous tab instead of the tools/weapons tab. I'd like them to go into the tools/weapons tab. 2. Is it possible to create a custom tab in the recipe book for one's mod items? If so, how?
-
Thanks! (Didn't this forum used to have a 'thank you' button?) Between you and examples in the Botania GitHub, which I strongly recommend for examples of any imaginable kind of crafting use-case, I got things working. After lots of crashing and pulling hair out over typos and a really subtle program flow bug that only manifested when I selectively disabled some items. The code I'm working on is here: https://github.com/Sinhika/SimpleOres2/tree/1.12
-
I am having trouble wrapping my head around the possibilties of the new recipe JSONs, and I have a specific use-case I don't know how to implement. Is there complete documentation anywhere? I have config file toggles for enabling/disabling certain recipes in my mod. With the JSON recipes, how would I only register a recipe if it is enabled in the config file?
-
[1.11.2/1.10.2] Need examples/tutorial for new config system
Sinhika replied to Sinhika's topic in Modder Support
Okay, thanks. The example is helpful. -
[1.11.2]warnings if Itemstack is null with eclipse
Sinhika replied to Mark136's topic in Modder Support
That's some useful information--I was doing it the old-school 'My IDE is vim' way--running a regex to search for "= null" expressions. -
http://mcforge.readthedocs.io/en/latest/gettingstarted/
-
Github multipe minecraft versions in seperate Folders
Sinhika replied to JTK222's topic in Modder Support
If you want to get serious with any version control system that wasn't originally designed for Windows (which is to say, any decent version control system; Visual SourceSafe was notoriously a POS), you're going to have to bite the bullet and get at least a basic familiarity with the console commands. That being said, a good manual is essential for looking up what to do when. Bookmark https://git-scm.com/book/en/v2 if you are working with git/GitHub, and read it at least the first several chapters. You'll also find yourself referring to it a lot, which is why I told you to bookmark it. p.s. I, too, tried using GitHub for Windows. Its lack of support for several key git options and commands helped me royally mess up my source trees. After recovering from that fiasco, I used the console from then on. These days I just develop on Linux, because I don't have to fight Windows for the privilege of using my choice of tools quite so much, but when I had to work on Windows, I installed Cygwin and used the console git for Cygwin. Now that Win10 has Ubuntu BASH shells, you might be able to install native git from the Ubuntu repo. -
What happened to the configuration subsystem? I decided to rewrite the old XML-based config system in a mod I am maintaining (don't throw tomatoes at me, XML wasn't my idea) back to standard Forge JSON-based config system, and the Forge config classes have changed drasticly since the last time I used them (1.7.10). I do not understand them at all; how are they supposed to be used? Does anyone out there have tutorials or examples of how to use the current system? Is it backwards-compatible with old Forge Config-based code (i.e., can I just use old-style config classes and methods)? Help?
-
So, if one has a bunch of closely-related mods, and (for ease of maintenance and CurseForge uploading) one wants to bundle them into one mod that uses the config file to enable/disable sub-modules, what are some good ways to go about it? Links to source code of mods that do such things (i.e. GrowthcraftCE--have link) would be most useful, and if you have some notions of pros and cons of various methods, I would like to read them.
-
Yes, that's it. Also, someone needs to fix the Forge Gradle Cookbook: the Gradle snippet for creating a deobfuscated file is wrong. I had to go browsing various mod sources on GitHub to find the correct snippet. What's in the Cookbook creates a jar file filled with source code, which doesn't work very well as an external lib. This snippet (from my build.gradle) works: task deobfJar(type: Jar) { from sourceSets.main.output classifier "deobf" } artifacts { archives deobfJar } Note the difference in the 'from' line.
-
I am sure that I do NOT. I take it I am supposed to use the unobfuscated version to build against? See, this is an example of "missing something that more experienced modders already know full well", but I've never actually been clear as to what unobfuscated jars were for, beside "to run client inside Eclipse". So why is it building okay when I instantiate a class from an obfuscated library?
-
Is late for me, so I may be less than coherent, but I'll leave these links up for you to ponder when you get the chance: I am working on the 1.9.4 port of "Fusion" for Alexndr's Simple Ores 2 collection of mods. Source here. Originally, I had blocks/SimpleFurnace.java and tiles/TileEntitySimpleFurnace.java in the SimpleCore API mod, which serves as a common library for all the Simple Ores2 mods, because I thought I might want a common base class for later use with the improved furnaces in the Simple Ores2 Machines mod. blocks/BlockFusionFurnace extends SimpleFurnace, and tiles/TileEntityFusionFurnace extends TileEntitySimpleFurnace. The problem I had was that where inventory/ContainerFusionFurnace's (the container class for the Fusion Furnace) detectAndSendChanges() and updateProgressBar() methods called TileEntityFusionFurnace methods getField() and setField(), that are actually inherited from TileEntitySimpleFurnace, they weren't found by the gradle compile. That is, "cannot find symbol" error. They weren't the only such errors; I believe stuff in SimpleFurnace wasn't found, either. When built within Eclipse, there were no compile errors. When I moved both parent classes into the Fusion mod, gradle build compiled okay. That is the current state you see at the source tree linked above.
-
I'm probably missing something that more experienced modders already know full well, but Google hasn't helped me on this. Hopefully someone here can point me in the right direction. Problem Description: - Child Class B in Mod Bb extends Parent Class A in mod Aa. - obfuscated jar file of Mod Aa is in Bb's ./libs directory. - Method A1() is implemented in Class A. - Class C in Mod Bb calls B.A1(). - Eclipse thinks everything is hunky-dory, builds okay. - ./gradlew build of Mod Bb fails with "Cannot find symbol" error for method A1(). Troubleshooting: - move parent Class A into Mod Bb. - Child class B, class C, etc as before. - Eclipse build still happy. - ./gradlew build of Mod Bb works fine. Just to be confusing: - class Z in Mod Aa. - Mod Bb instantiates Z (NOT extends). (e.g. "Z z1 = new Z();") - everything builds just fine. What am I doing wrong? How do I fix it so parental class for lib/core/api-type mod can be properly inherited and its methods invoked by a child class in another mod.
-
The contents of the changelog for everything after 1954 (I think?) are missing--just the word "Changelog:" and nothing more.
-
Wanting to Get Into Modding Which Version Should I Use?
Sinhika replied to Zeliox's topic in General Discussion
I finally decided to do all further development in 1.9.4, because while Git has branches for different versions of mod code, my brain does not have branching for different versions of "how to code this crap in Forge". Keeping track of all the idiosyncracies and changed class names and methods and processes between 1.7.10, 1.8.9, early 1.9, and the moving target that is currently 1.9.4 is a PITA. I decided to save myself grief and just go with 1.9.4. Now if the 1.9.4 API would just settle down...