Maybe you being unavailable is a GOOD thing - it forced me to really look at my code. I went ahead & turned off EVERYTHING (using // to remark out all the lines) and ran the code with no errors. I then started putting things back in, a piece at a time. The problem turned out to be a conflict between my Food class and my Plants class, which both had items with the same names. Once I deleted the extraneous items, everything was good to go.
I've updated the github posted above; this is now the current, working version of the code. There are three things which do NOT work:
1. The planted plants have no textures, at any age.
2. The planted plants do not remain in the world when you quit.
3. Half slab + half slab ≠ full block.
Now, I'd taken out my block_double_slab items, as they were causing problems; I'll go ahead & see if I can recreate them, and / or looking at the vanilla code for guidance. Currently, I'm looking at the code to see if I can figure out the texture issue (they were working before this change). Even though I didn't think it was relevant, I've posted the console to https://pastebin.com/DMvz5w6h. I didn't see anything there which might explain why the textures are missing.
1. Your custom plant code is a complete mess with loads of useless and broken code. That's not what I told you to do, is it? I told you to copy one of vanilla examples like (BlockBeetroot, BlockCarrot, etc). Also, since plants are much more complex than regular blocks I would create separate classes for each plant.
3. I don't even see where you're registering your ItemSlabs.
Here's a few things I noticed that you should change:
1. That's not a good way to register ItemBlocks. First off, I recommend extending ItemBlock or creating a method and simply setting registry and unlocalized from a block param. Secondly, it's better to keep actual references to the ItemBlocks rather than passing new instances into the registry.
2. What the hell is code like Custom_Plant.addSeeds? Do you even understand what you've written? Remove all of it.
3. What are you even doing in your proxies? Why are you calling super from your client and registering things in the common proxy? I would move everything from your common proxy to the main class.
4. Why do you even still have useless code like IMetaName and ItemBlockVariants. Clean up, please.
5. Why do you have separate classes for your food if they are absolutely identical?
6. What is RegistryHandler? Remove it immediately.
7. Why do you have separate classes just to set their creative tab (in your Items and Tools package)? Remove them. Also, why do your nuggets and ingots have sub types? Didn't I tell you to remove those?
1. The code for Custom_Plant is copied directly from vanilla's Beet. There are minor modifications (7 stages, rather than 3), but it's the same code. I don't know which code you might consider "broken" or "useless" unless you point out specific functions which you believe fall under that category. Separate plant classes? Why not simply have reusable code, as you've been telling me so long? I mean, there's no difference between each plant, other than the seed they use and the fruit they produce, and the code is built to handle that.
3. ItemSlabs: See attached picture.
1. I've created a Custom_ItemBlocks class, and an Init_ItemBlocks class, which helps clean this up.
2. I know EXACTLY what I've written here. The point of this was to have one single plant class, which is reusable. Since I don't have individual plant classes each with their own specific plants and specific seeds, I've written this to give each plant its proper seeds. If I make it so that each plant has its own class, as you've suggested, this function will be eliminated, as it would be unnecessary.
3. I removed super from the Client. I also moved all that code to the main class. I'm not sure WHY I had the super in the proxies; it's probably code from a tutorial I was following. It's all gone now.
4. Both of those pieces have been eliminated.
5. My food is identical. My ore is identical. My armor types are identical. My tools are identical. My blocks are identical... there's a pattern here, see? I've been focusing on getting things INTO the game and making certain everything works. Obviously, I do not intend to have things be identical. Each food item will have separate properties, as will the ore, armor, etc. They'll each be unique and add something special to the game. I already have this planned out. For now, until EVERYTHING is working properly, they're staying as they are.
7. I hadn't gotten around to removing the subtypes. It's done now, and there's only a Custom_Item class, which sets the proper tab. AFAIK, the custom tools are done correctly. There's a separate class for each TYPE of tool - because each tool is handled differently by minecraft. I've reused the code in creating different tools (i.e. copper vs. emerald), but the parameters (hardness, etc.) will change later.
The new pastebin is at https://pastebin.com/raRaEaBq. I see the errors regarding double slabs; but there shouldn't be any double slab in the 'item' category; they only exist as a block (at least, as far as I can tell from vanilla). I'm still working on studying that code. I have also updated the github code to reflect the changes.
1. If you're so sure then explain to me what you think the addSeeds method does and why you have made the seeds field static. There is a point where you want to start creating separate classes instead of reusable ones. That's usually when there are too many variables and properties that should change.
2. Your picture shows me the slab blocks you're registering, not the items...
3. You don't need to create your own tool classes since the vanilla already has them implemented for you (ItemAxe, ItemPickaxe, ItemSpade, ItemHoe, ItemSword)
1. I think that the addSeeds method adds the seeds to the plant - that's what it's intended to do. In the code, it specifies the seed; since I can't do it directly (unless I have individual plant classes), this is how I specified the seeds. I thought I was pretty clever, figuring out on my own how to make the plants reusable. However, since you insisted, I've gone ahead & made each plant a separate class.
2. The picture was from the ItemBlocks class; this is where the "item" is being registered, isn't it? Do I need an Item for the blocks? I didn't think I had one before; maybe I was missing it. Perhaps it was the ForgeRegistries.ITEMS.register that was creating an item; I thought it was creating an ItemBlock; if I need items, I'll make them...
3. I tried removing my custom tools - but when I tried it, the registration of Pickaxe & axe gave the error "The constructor ItemPickaxe(Item.ToolMaterial) is not visible".
I have updated the github code to reflect the change to the plants. They still don't have their textures.
1. If you actually understood your own code... Firstly, you had your seeds item field static meaning it would be shared across every single instance of the class (so every one of your plants would have the same seed). Secondly, the method would just overwrite the previous value meaning that during initialization it would just overwrite the seeds every time (so only the last seed set by this method would remain).
2. I see on the picture you're registering your half- and double- slab blocks. You should have an ItemSlab for the half- (and maybe the double-) slab, how else would you be able to place them in the world?
3. Sorry, I forgot the tools' constructors were protected. However, you were still doing it wrong. Instead of re-creating the tools in your classes all you should do is extend the existing ones.
1. Ah. I see. Well, I probably made it static because the program said it had to be static... without realizing what that would do.
2. After a lot of beating my head against the wall and examining the original code (which worked, even if it DID use ForgeRegistries), I was finally able to create the slabs correctly. The half slabs place properly, and make a full-size block properly.
3. This SHOULD be better.
* My glass slabs aren't clear.
* My glass stairs are clear, but can be seen through to the end of the world.
* My plants still don't have textures, and still don't persist in the world.
1,2. You will probably have to make a separate class specifically for the glass blocks. Look at BlockGlass to solve your errors.
3. Missing textures are most likely caused by missing models/textures, show your log.
4. Not sure why they don't persist. You mean they disappear during reload? All I can notices is that you're running the plants' updateTick method twice (you're calling super and copying the code from the super class, remove the code you copied). Also in getBoneMealAgeIncrease it's better to call super than to re-write the code.
The glass stairs are in their own class; the glass slabs are a reuse of the generic slab class, but work the same way even if in their own class. The only time the "see through the world" thing is a problem is when they're placed directly on the ground. Otherwise, they're normally transparent. Lately, it hasn't been "see through the whole world," but just a single off-white square. Sometimes it DOES go back to the whole world thing, though.
I've looked at BlockGlass, and my code is now identical (with the exception of the "extends" part). I can't extend two different classes, and I'm not sure the other extension is necessary - it has to do with breakage.
3 & 4. I finally got the plants working - and they persist as well. I changed the updateTick & getBoneMealAgeIncrease (that didn't have an effect), but put the plant items and plant blocks initialization in separate classes, the same way I'm doing with regular items and regular blocks. This, plus correcting the names of the blocks, made the plants work.
I've updated the github code accordingly.
Anyway, I'm now back to the point I was at before you helped me make these changes - every single block works properly. The only 'problem' one is the glass blocks, and they only have one issue. Now that things are working, I can focus on making my blocks / plants / items / tools differentfrom each other. There are still a few things left to do - for instance, I'm trying to work out why I can't have two different "in" slots in my furnace, and I'm trying to find out how to make a block that detects and generates redstone signals (this one's very advanced; I know I'm not ready for it yet, but I'm doing research, learning as much as I can along the way). I also need to study structures (how to get them into the world), and how to make my entities spawn inside the structures.
You didn't listen to what I said again. You NEED to create separate classes for the glass stairs and slabs. They have some methods that don't belong in the reusable classes. You will need to copy some (or all, I don't remember) of BlockGlass' methods into your separate glass stairs and slab classes.
I have created a separate class for each type of slab, and each type of stairs. I added to the glass versions code from both BlockGlass and BlockBreakable. However, as you see, my problem still persists. The "bottom" side of the block lets you see through whatever it's against. I posted the console log at https://pastebin.com/KkYCi56B. I'm still getting the errors on the double slabs from item (there isn't a model for the double slab; there shouldn't be one; I'm not sure how to resolve this error, other than creating a model for it, even though it shouldn't have one). I updated the github code as well. I was worried for a while when I couldn't create a new world - the game was stuck - then realized it was my world generator, caused by code I had commented out. Bleh.
Where can I find acacia_double_slab? I've looked both in the block and item classes, and in the slab classes, but can't find it. Somehow, when I uploaded the files to github, some of the files ended up in the wrong location. It's fixed now.
I made my double_slab blockstates look like the acacia one; the new pastebin is at https://pastebin.com/1qsrRD7L. The github code has been updated. Now the double slabs have no texture, and the errors persist.
2. I forgot (like always) that BlockGlass extends BlockBreakable. So you either copy BlockBreakable's methods into your glass slab/stairs or you create a custom stairs/slab breakable class and extend your glass slab/stairs from these.
3. So from what I see the errors are related to your double slab ItemBlocks? Why do you even need these? Don't register them.
I have the pastebin at https://pastebin.com/wJJLCjKr and I've updated the code again. I made my stairs based on BlockGlass (that way, the stairs should have all the features of both BlockGlass and BlockBreakable); however, the texture problem persists. I have absolutely no idea what to do about the errors I'm getting with the slabs. They appear to work, but I'd like to see them work with NO ERRORS showing. I tried creating an entirely new block, based solely on BlockStoneSlab, but it had similar errors.
1. How many times do I have to say? You only need separate classes for glass-related blocks, everything else easily can and should be reused.
2. I see you're copying a lot of code from the BlockSlab class making it useless. Just look at an example like BlockWoodSlab and copy its code (but not blindly, decided what you need and what you don't need like metadata).
3. I'm kind of stumped with the visibility bug. Try maybe changing the if statement in your shouldSideBeRendered method to check if the current class is your slab block class.
4. As I already said (like 3 times), your errors are related to the double slab ItemBlocks. Why do you even need them if your double slabs look identical to regular blocks???
Ok, I've made some major changes, all posted to the github. The code runs with no errors. The visibility bug still persists. Any time a glass stair or slab is up against another block, it makes it so that you can see through that other block. I have the code from BlockBreakable in my stairs; however, when in my slab, it caused the game to crash. I took it out, ran the code, and then put it in again - and this time it DIDN'T crash. Go figure.
I did make it so that I have one Glass_Slab and one Custom_Slab, and one Glass_Stairs and one Custom_Stairs, so that the code would be reusable.
Curiously enough, the texture problem with the slabs ONLY occurs when the long side is against a block; when the side of the half slab is against the block, it works just like it's supposed to. But if you make it into a full slab... well, the problem is actually increased, with the see-through effect happening on ALL sides of the block.
With the stairs, it's only the bottom and back (the two full sides) which have the problem. I expect it's something to do with the full side and rendering - but no matter what I've done, I can't get rid of the problem.