I'm not sure how you've managed to corrupt the fluid registry. Post the Chlorine and ChlorineBlock classes.
Models cannot be registered from common code like you're doing now, they must only be registered on the client side.
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: ****************************************
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: * The object Block{bleachcraft:ChlorineBlock} has been registered twice for the same name bleachcraft:ChlorineBlock.
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: * at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:436)
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: * at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.register(FMLControlledNamespacedRegistry.java:803)
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: * at net.minecraftforge.fml.common.registry.GameData.register_impl(GameData.java:243)
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: * at net.minecraftforge.fml.common.registry.GameRegistry.register(GameRegistry.java:146)
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: * at net.bleachcraft.Proxy.CommonProxy.preInit(CommonProxy.java:14)
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: * at net.bleachcraft.Proxy.ClientProxy.preInit(ClientProxy.java:21)...
[09:42:29] [Client thread/WARN] [FML/BleachCraft]: ****************************************
You're registering the ChlorineBlock instance twice.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You posted an old version of your Fluids class instead of ChlorineBlock.
You create an instance of Chlorine and store it in the Chlorine.instance field, but you then create another instance, store it in the Fluids.chlorine field and register it. You should only be creating, registering and using a single instance.
Get rid of the Chlorine.instance and ChlorineBlock.instance fields, instantiate both classes in Fluids.registerFluids and store them in the fields of Fluids.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I think I fixed the issue with It being registered twice. It was caused by a second registration of the Chlorine.instance[/i] and ChlorineBlock.instance[/i] fields in my commonProxy. If I remove that the game loads without crashing and world loading/creation works great. The only problem is that the inventory texture is default purple/black for my fluid block but placing the fluid renders normally.
Here's my FML log and sorry about the mistake post before; Here is my ChlorineBlock class. :I
[20:31:14] [Client thread/ERROR] [FML/]: fluid 'Clorine' not found
You're using the forge:fluid model and specifying a fluid that doesn't exist. Fluid names are always lowercase and you've renamed the fluid to "chlorine", so use this name.
[20:31:44] [Client thread/ERROR] [FML/]: Exception loading model for variant bleachcraft:TestFluidBlock#fluid for blockstates ["bleachcraft:TestFluidBlock[level=3]", "bleachcraft:TestFluidBlock[level=2]", "bleachcraft:TestFluidBlock[level=1]", "bleachcraft:TestFluidBlock[level=0]", "bleachcraft:TestFluidBlock[level=7]", "bleachcraft:TestFluidBlock[level=6]", "bleachcraft:TestFluidBlock[level=5]", "bleachcraft:TestFluidBlock[level=4]", "bleachcraft:TestFluidBlock[level=11]", "bleachcraft:TestFluidBlock[level=10]", "bleachcraft:TestFluidBlock[level=9]", "bleachcraft:TestFluidBlock[level=8]", "bleachcraft:TestFluidBlock[level=15]", "bleachcraft:TestFluidBlock[level=14]", "bleachcraft:TestFluidBlock[level=13]", "bleachcraft:TestFluidBlock[level=12]"]
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model bleachcraft:TestFluidBlock#fluid with loader VariantLoader.INSTANCE, skipping
...
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
...
[20:31:44] [Client thread/ERROR] [FML/]: Exception loading blockstate for the variant bleachcraft:TestFluidBlock#fluid:
java.lang.Exception: Could not load model definition for variant bleachcraft:TestFluidBlock
...
Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model bleachcraft:blockstates/TestFluidBlock.json
...
Please post the latest versions of your main class, your proxy classes, your model registration class (if any), your fluid registration class and your fluid and fluid block classes.
Even better than posting the individual classes would be posting a repository on a site like GitHub/BitBucket containing your whole mod. If you're using Git, you can use this.gitignore file as a template for your own. It ignores everything (first two lines) except the required files (the lines starting with an exclamation mark).
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You're using the forge:fluid model and specifying a fluid that doesn't exist. Fluid names are always lowercase and you've renamed the fluid to "chlorine", so use this name.
If i change public static final String name = "Chlorine"; To public static final String name = "chlorine"; The block still renders incorrectly (As default) My fml log Thanks for the help !
If i change public static final String name = "Chlorine"; To public static final String name = "chlorine"; The block still renders incorrectly (As default) My fml log Thanks for the help !
It was actually a blockstates file using the incorrect fluid name, though using the correct case in your code will help avoid possible issues. The error isn't in the new log, so you may have fixed it.
[21:46:42] [Client thread/ERROR] [FML/]: Exception loading model for variant bleachcraft:ChlorineBlock#inventory for item "bleachcraft:ChlorineBlock", normal location exception:
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model bleachcraft:item/ChlorineBlock with loader VanillaLoader.INSTANCE, skipping
...
Caused by: java.io.FileNotFoundException: bleachcraft:models/item/ChlorineBlock.json
...
[21:46:42] [Client thread/ERROR] [FML/]: Exception loading model for variant bleachcraft:ChlorineBlock#inventory for item "bleachcraft:ChlorineBlock", blockstate location exception:
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model bleachcraft:ChlorineBlock#inventory with loader VariantLoader.INSTANCE, skipping
...
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
You're telling the item form of ChlorineBlock to use the bleachcraft:ChlorineBlock#inventory model, but there's no item model with this name and no inventory variant in the blockstates file.
Either create the inventory variant in the blockstates file or use a variant that exists.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You're still creating two separate instances of Chlorine and registering the one that's not used anywhere. Delete the instance fields in Chlorine and ChlorineBlock; then instantiate, register and store the instances of these classes in Fluids.
You're registering an item model that doesn't exist for ChlorineBlock in Fluids.registerFluids (because you passed the ModelResourceLocation constructor a single string with a comma in it instead of two separate strings), this takes priority over the correct model that you register in ClientProxy#preInit. It will also crash the dedicated server since you're using client-only classes in common code. Delete the Fluids.registerRender method and the call to it.
I recommend deleting or at least renaming ClientProxy.registerFluidRender, it's not currently used anywhere and has nothing to do with fluids.
ClientProxy.registerItemRender and ClientProxy.registerFluidRender should be private, you shouldn't be registering models from anywhere else. I would also recommend moving all model registration to a separate client-only class and calling this from ClientProxy.
The FML log you posted appears to be an old one, it still has several references to clorine even though you've renamed these to chlorine.
Please use your IDE's auto-formatting feature on your code. The indentation and blank space is a mess.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You're still creating two separate instances of Chlorine and registering the one that's not used anywhere. Delete the instance fields in Chlorine and ChlorineBlock; then instantiate, register and store the instances of these classes in Fluids.
You're registering an item model that doesn't exist for ChlorineBlock in Fluids.registerFluids (because you passed the ModelResourceLocation constructor a single string with a comma in it instead of two separate strings), this takes priority over the correct model that you register in ClientProxy#preInit. It will also crash the dedicated server since you're using client-only classes in common code. Delete the Fluids.registerRender method and the call to it.
Please use your IDE's auto-formatting feature on your code. The indentation and blank space is a mess.
1) I thought my only two instances for chlorine were my chlorine instance and my chlorineBlock instance.
2) I changed my code a little to fix the string error and it worked! The model loaded properly. I also had no errors in my fml log! Am I still registering models in common code? CODE
3) In eclipse, how do I access Its auto-formatting feature?
4) Also how do I register a fluid to a bucket when I have Universal Bucket enabled?
1) I thought my only two instances for chlorine were my chlorine instance and my chlorineBlock instance.
You're creating an instance of Chlorine in the Chlorine.instance field's initialiser and in Fluids.registerFluids. You use the former in the ChlorineBlock constructor but only register the latter.
Like I said before, delete the instance fields and move the instantiation, registration and storage to the Fluids class.
2) I changed my code a little to fix the string error and it worked! The model loaded properly. I also had no errors in my fml log! Am I still registering models in common code? CODE
You're using the correct model location now, but Fluids.registerFluids is called on both sides (i.e. it's common code). When it calls ClientProxy.registerFluidRender on the dedicated server, it will crash with a ClassNotFoundException.
You must only register models in client-only code (i.e. your client proxy or a client-only class called from it).
This is why I told you to delete the Fluids.registerRender method and make the static methods in ClientProxy private (and/or move them to a separate class).
3) In eclipse, how do I access Its auto-formatting feature?
I don't use Eclipse, so I don't know the answer to this. Google and other search engines probably do.
4) Also how do I register a fluid to a bucket when I have Universal Bucket enabled?
Are you trying to make a block or a bucket? Your title and post say different things.
If it's a bucket, just call FluidRegistry.enableUniversalBucket before preInit (in a static initialiser of your @Mod class) and then call FluidRegistry.addBucketForFluid for each Fluid you want a bucket added for. This will use Forge's universal bucket.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You're using the correct model location now, but Fluids.registerFluids is called on both sides (i.e. it's common code). When it calls ClientProxy.registerFluidRender on the dedicated server, it will crash with a ClassNotFoundException.
You must only register models in client-only code (i.e. your client proxy or a client-only class called from it).
This is why I told you to delete the Fluids.registerRender method and make the static methods in ClientProxy private (and/or move them to a separate class).
I got the fluid bucket to work, I think I fixed the instance issue, I figured out how to do auto format in eclipse (CTRL--SHIFT--F) and the only thing I am not fully understanding is the quote above.
Isn't ClientProxy.registerFluidRender a client only method so it isn't run on the server side?
Isn't ClientProxy.registerFluidRender a client only method so it isn't run on the server side?
It's a client-only method, but you're calling it from a common method (Fluids.registerRender, called from Fluids.registerFluids, called from BleachCraft#preInit).
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
So should I just move my Fluids.registerRender into my clientProxy class?
You're already registering a model for ChlorineBlock in ClientProxy, you should just delete Fluids.registerRender.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Get rid of the Chlorine.instance and ChlorineBlock.instance fields, instantiate both classes in Fluids.registerFluids and store them in the fields of Fluids.
I recommend deleting or at least renaming ClientProxy.registerFluidRender, it's not currently used anywhere and has nothing to do with fluids.
ClientProxy.registerItemRender and ClientProxy.registerFluidRender should be private, you shouldn't be registering models from anywhere else. I would also recommend moving all model registration to a separate client-only class and calling this from ClientProxy.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I'm not sure how you've managed to corrupt the fluid registry. Post the Chlorine and ChlorineBlock classes.
Models cannot be registered from common code like you're doing now, they must only be registered on the client side.
You're registering the ChlorineBlock instance twice.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Chlorine.java
ChlorineBlock.java
You posted an old version of your Fluids class instead of ChlorineBlock.
You create an instance of Chlorine and store it in the Chlorine.instance field, but you then create another instance, store it in the Fluids.chlorine field and register it. You should only be creating, registering and using a single instance.
Get rid of the Chlorine.instance and ChlorineBlock.instance fields, instantiate both classes in Fluids.registerFluids and store them in the fields of Fluids.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I think I fixed the issue with It being registered twice. It was caused by a second registration of the Chlorine.instance[/i] and ChlorineBlock.instance[/i] fields in my commonProxy. If I remove that the game loads without crashing and world loading/creation works great. The only problem is that the inventory texture is default purple/black for my fluid block but placing the fluid renders normally.
Here's my FML log and sorry about the mistake post before; Here is my ChlorineBlock class. :I
You're using the forge:fluid model and specifying a fluid that doesn't exist. Fluid names are always lowercase and you've renamed the fluid to "chlorine", so use this name.
assets/bleachcraft/blockstates/TestFluidBlock.json doesn't exist.
Please post the latest versions of your main class, your proxy classes, your model registration class (if any), your fluid registration class and your fluid and fluid block classes.
Even better than posting the individual classes would be posting a repository on a site like GitHub/BitBucket containing your whole mod. If you're using Git, you can use this .gitignore file as a template for your own. It ignores everything (first two lines) except the required files (the lines starting with an exclamation mark).
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
If i change public static final String name = "Chlorine"; To public static final String name = "chlorine"; The block still renders incorrectly (As default)
My fml log Thanks for the help !
It was actually a blockstates file using the incorrect fluid name, though using the correct case in your code will help avoid possible issues. The error isn't in the new log, so you may have fixed it.
You're telling the item form of ChlorineBlock to use the bleachcraft:ChlorineBlock#inventory model, but there's no item model with this name and no inventory variant in the blockstates file.
Either create the inventory variant in the blockstates file or use a variant that exists.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I never had made a model file for my fluid and I didn' see you do it here is there something I am missing? Here's a link to my new Github BleachCraft mod.
You'll need a blockstates file, like this one.
If I change my block states files to a one like yours Everything renders the same but the fluid block in the Inventory is still default. Here is a link to my mod code. Here is my fml log
Also how would I register my fluid and bucket with the universal bucket?
You're still creating two separate instances of Chlorine and registering the one that's not used anywhere. Delete the instance fields in Chlorine and ChlorineBlock; then instantiate, register and store the instances of these classes in Fluids.
You're registering an item model that doesn't exist for ChlorineBlock in Fluids.registerFluids (because you passed the ModelResourceLocation constructor a single string with a comma in it instead of two separate strings), this takes priority over the correct model that you register in ClientProxy#preInit. It will also crash the dedicated server since you're using client-only classes in common code. Delete the Fluids.registerRender method and the call to it.
I recommend deleting or at least renaming ClientProxy.registerFluidRender, it's not currently used anywhere and has nothing to do with fluids.
ClientProxy.registerItemRender and ClientProxy.registerFluidRender should be private, you shouldn't be registering models from anywhere else. I would also recommend moving all model registration to a separate client-only class and calling this from ClientProxy.
The FML log you posted appears to be an old one, it still has several references to clorine even though you've renamed these to chlorine.
Please use your IDE's auto-formatting feature on your code. The indentation and blank space is a mess.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
1) I thought my only two instances for chlorine were my chlorine instance and my chlorineBlock instance.
2) I changed my code a little to fix the string error and it worked! The model loaded properly. I also had no errors in my fml log! Am I still registering models in common code? CODE
3) In eclipse, how do I access Its auto-formatting feature?
4) Also how do I register a fluid to a bucket when I have Universal Bucket enabled?
You're creating an instance of Chlorine in the Chlorine.instance field's initialiser and in Fluids.registerFluids. You use the former in the ChlorineBlock constructor but only register the latter.
Like I said before, delete the instance fields and move the instantiation, registration and storage to the Fluids class.
You're using the correct model location now, but Fluids.registerFluids is called on both sides (i.e. it's common code). When it calls ClientProxy.registerFluidRender on the dedicated server, it will crash with a ClassNotFoundException.
You must only register models in client-only code (i.e. your client proxy or a client-only class called from it).
This is why I told you to delete the Fluids.registerRender method and make the static methods in ClientProxy private (and/or move them to a separate class).
I don't use Eclipse, so I don't know the answer to this. Google and other search engines probably do.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I got the fluid bucket to work, I think I fixed the instance issue, I figured out how to do auto format in eclipse (CTRL--SHIFT--F) and the only thing I am not fully understanding is the quote above.
Isn't ClientProxy.registerFluidRender a client only method so it isn't run on the server side?
It's a client-only method, but you're calling it from a common method (Fluids.registerRender, called from Fluids.registerFluids, called from BleachCraft#preInit).
This page explains sides in more detail.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thanks for the link
So should I just move my Fluids.registerRender into my clientProxy class?
You're already registering a model for ChlorineBlock in ClientProxy, you should just delete Fluids.registerRender.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thanks Now I get it! I updated my code on GitHub. Is there anything else you would recommend.
ModItems.registerItems is registering models from common code, don't do this.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.