• 0

    posted a message on Eclipse help

    Neither of those are errors, neither of those crash the game.


    Post your FML log (logs/fml-client-latest.log) and code with syntax highlighting using Gist or Pastebin. If you have a repository on a site like GitHub/BitBucket, link that instead of posting individual classes.

    Posted in: Modification Development
  • 0

    posted a message on Creating working fluid buckets?

    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.

    Posted in: Modification Development
  • 0

    posted a message on wood renders don't play nice in inventory.

    So it's all working now?

    Posted in: Modification Development
  • 0

    posted a message on wood renders don't play nice in inventory.

    Are there any remaining issues?


    You didn't update the log or the TheEverythingMod class.

    Posted in: Modification Development
  • 0

    posted a message on wood renders don't play nice in inventory.

    getRegistryName and setRegistryName don't exist in 1.8.8 even in the latest forge version

    You should update to 1.8.9 or newer where they do exist.


    not sure i understand this one...i haven't been modding for long

    Use item.getRegistryName() instead of Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5) as the model location in TEM_blocks.registerRender. If you must use 1.8.8, use Item.itemRegistry.getNameForObject(item) instead of item.getRegistryName() to get the registry name of an item.


    ok, although explaining why would be a nice touch

    ModelLoader.setCustomModelResourceLocation will call ModelBakery#registerItemVariants for you, which tells Minecraft to load the model.


    does the fml-client-latest.txt file even generate when mc's run from eclipse?
    huh.

    The FML log is always generated.


    - if i use the replacement for ItemModelMesher, i load my testing world back up and everything from my mod's missing a texture. literally everything.

    Are you calling the ModelLoader methods in preInit like I told you to?


    Post your new log, code and assets.

    Posted in: Modification Development
  • 0

    posted a message on wood renders don't play nice in inventory.

    The following advice assumes you're using 1.8.9. 1.8.8 was quickly superseded (just over a month between the initial commit of Forge for each version) and I no longer have a workspace set up for it. Most 1.8.8 code should work in 1.8.9 without issue.


    Don't use unlocalised names for anything except display/translation purposes. They're not unique and can change at any time.


    Use Block#setRegistryName to set the registry name of your Block and then use an overload of GameRegistry.registerBlock without a name argument to register it. This is similar to how the new registry system in 1.9+ works and also applies to Items.


    If the registry and unlocalised names of a Block/Item are the same, set the unlocalised name to the full registry name (setUnlocalizedName(getRegistryName())). This will include your mod ID, preventing conflicts with other mods.


    The default model loaded for every Item is the one with its registry name, so use this as the default model location for your Items.


    Don't use ItemModelMesher#register to register your item models, use ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition in preInit.


    Models should be registered from a dedicated client-only class called from your client proxy.


    The SwitchEnumAxis class can be deleted. Java auto-generates classes like this when you use an enum in a switch statement.

    Always annotate override method with @Override so you get a compilation error if the method doesn't override a super method.


    You've posted the console output rather than the FML log.



    [03:55:29] [Client thread/ERROR] [FML]: Model definition for location tem:log#inventory not found
    [03:55:29] [Client thread/ERROR] [FML]: Model definition for location tem:planks#inventory not found



    The model loader error reporting wasn't that great in 1.8.x, so it's not entirely clear from the log what the issue is. I suspect you don't have item models with those names.


    You're also only registering models for metadata 0 and your blockstates files only specify models for the cherry variant.

    Posted in: Modification Development
  • 0

    posted a message on wood renders don't play nice in inventory.

    Post your code, assets and FML log (logs/fml-client-latest.log) using Gist/Pastebin or your whole mod using GitHub/BitBucket.


    If you have to use 1.8.x, at least use 1.8.9; it was actively developed for a fair while after 1.8.8. I would recommend using 1.10.2 instead, it's the only version receiving new features and bug fixes.

    Posted in: Modification Development
  • 0

    posted a message on Creating working fluid buckets?
    Quote from circuitdh»

    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.
    Posted in: Modification Development
  • 0

    posted a message on looking to install baubles: need a bit of guidance...

    (wow another double post holy bajeezus nobody saw that coming)


    so uh:


    [23:03:11] [Client thread/ERROR] [FML]: Model definition for location baubles:Ring#inventory not found




    i think i may have actually figured out the first part of the problem.

    hooray i'm actually looking at error logs now.


    ...what exactly does this error mean? i'm getting it with a block i'm adding as well (which is for another time) and it's kind of irritating...not to mention i have reason to suspect it's (possibly) what's crashing baubles' expanded inventory.


    is this a relevant issue, or is it a separate problem entirely?


    That means that an item (probably baubles:Ring) is trying to use a model that doesn't exist. Missing models don't crash the game, they just cause the item/block to render as a pink and black cube.
    Posted in: Modification Development
  • 0

    posted a message on Creating working fluid buckets?
    [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
    ...

    Caused by: java.io.FileNotFoundException: bleachcraft:blockstates/TestFluidBlock.json

    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).

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED]

    Do you actually have item models or blockstates files named with your items' registry names? I have an explanation of the model loading process and how model locations are mapped to models here.


    If you post the full FML log (logs/fml-client-latest.log), I may be able to tell you more about why your models aren't loading.

    Posted in: Modification Development
  • 0

    posted a message on Creating working fluid buckets?

    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.

    Posted in: Modification Development
  • 0

    posted a message on How to obtain the durability of a tool / weapon / armor ?

    Use ItemStack#isItemStackDamageable, ItemStack#getItemDamage and ItemStack#getMaxDamage.


    Don't use ItemTool here, any Item can be damageable.

    Posted in: Modification Development
  • 0

    posted a message on Creating working fluid buckets?

    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.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED]

    The registry system was overhauled in 1.9, GameRegistry.register no longer creates an ItemBlock for your Block; you must do that yourself if you want your block to have an item form. Create the ItemBlock, set its registry name to the Block's registry name and then register it with GameRegistry.register.


    Don't use unlocalised names for anything except display/translation purposes, they're not unique and can change at any time. The default model loaded for every Item is the one with its registry name, so use this as the default model location for your items (like you're doing in the code you've commented out).


    Don't use ItemModelMesher#register, use ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition in preInit.


    In 1.9+, standard display transformations (the "display" block in the model file) are already defined by the item/generated and block/block models. These are inherited by most item and block models, respectively. Only define display transformations yourself if your model should display differently.


    In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.


    It's much easier to read code with proper formatting and syntax highlighting.

    Posted in: Modification Development
  • To post a comment, please .