Jump to content

Minecraft 1.8 Modding Help


Flight

Recommended Posts

Hello, my name is flight and I wish to seek help. I am new to to the forums and am excited to be here! Anyway here is the problem. I was making a new block called Ancient Grass. I made the code and json files to give textures to the block when it is in hand and placed. Although it seems to still give me the purple and black texture when I break the block. Here is my code and json files.

 

BlockMod Class (This is where my blocks are registered to the game)

 

 

package com.cam.block;

 

import com.cam.BaseMod;

import net.minecraft.block.material.Material;

import net.minecraft.client.Minecraft;

import net.minecraft.client.renderer.entity.RenderItem;

import net.minecraft.client.resources.model.ModelResourceLocation;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.FMLCommonHandler;

import net.minecraftforge.fml.common.registry.GameRegistry;

import net.minecraftforge.fml.relauncher.Side;

 

public class BlockMod {

 

  public static AncientGrass ancientGrass;

  public static ToonedOre toonedOre;

 

  public static void preInit() {

 

      ancientGrass = new AncientGrass("AncientGrass", Material.grass, "ancientgrass");

      GameRegistry.registerBlock(ancientGrass, ancientGrass.name);

 

      toonedOre = new ToonedOre();

      GameRegistry.registerBlock(toonedOre,toonedOre.name);

  }

 

  public static void init() {

 

      if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {

        RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();

 

        renderItem.getItemModelMesher().register(Item.getItemFromBlock(BlockMod.ancientGrass),0, new ModelResourceLocation(BaseMod.instance.MODID +":" + BlockMod.ancientGrass.name, "inventory"));     

      }

  }

 

}

 

Ancient Grass Class

[/size]

package com.cam.block;

 

 

import com.cam.BaseMod;

import com.cam.item.ItemMod;

 

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IIconCreator;

 

 

public class AncientGrass extends Block {

 

 

  public static final String name = "AncientGrass";

 

 

  protected AncientGrass(String unlocalizedName, Material material, String name)

  {

      super(material);

      //this.name = name;

      this.setUnlocalizedName(BaseMod.MODID + "_" + unlocalizedName);

      this.setCreativeTab(ItemMod.tabMyMod);

      this.setHardness(1.0F);

      this.setResistance(6.0F);

      this.setStepSound(soundTypeGrass);

     

     

  }

 

 

}

 

 

Ancient Grass(BlockStates JSON[/font])

 

 

{

  "variants": {

    "normal": {[/font]

        "model": "cammod:AncientGrass"[/font]

    }[/font]

  }[/font]

}[/font]

 

Ancient Grass(Block JSON)[/font]

 

 

{

    "textures": {

        "0": "cammod:blocks/Ancient_side",

        "1": "cammod:blocks/AncientGrass",

        "2": "cammod:blocks/AncientGrass_bottom"

    },

    "elements": [

        {

            "name": "Cube",

            "from": [ 0.0, 0.0, 0.0 ],

            "to": [ 16.0, 16.0, 16.0 ],

            "faces": {

                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },

                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },

                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },

                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },

                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },

                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }

            }

        }

    ]

}[/font]

Help would be greatly appreciated!

Link to comment
Share on other sites

Wait I mean your block model JSON and I mean something like....

 

"particle": "modid:blocks/texturename"

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Second post corrects my error but it would be like this.

 

{
    "textures": {
        "0": "cammod:blocks/Ancient_side",
        "1": "cammod:blocks/AncientGrass",
        "2": "cammod:blocks/AncientGrass_bottom"
    },
    "elements": [
        {
            "name": "Cube",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 16.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
                "particle": "modid:blocks/texturename"
            }
        }
    ]
}[/font]

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Not exactly... (Just warnings except the first line)

 

Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

[18:19:51] [main/INFO] [GradleStart]: Extra: []

[18:19:52] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, /Users/cameronreynes/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken{REDACTED}, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]

[18:19:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[18:19:52] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[18:19:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker

[18:19:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker

[18:19:52] [main/INFO] [FML]: Forge Mod Loader version 11.14.4.1563 for Minecraft 1.8 loading

[18:19:52] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_91, running on Mac OS X:x86_64:10.11.5, installed at /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre

[18:19:52] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[18:19:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker

[18:19:53] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin

[18:19:53] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin

[18:19:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[18:19:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[18:19:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[18:19:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[18:19:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[18:19:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[18:19:55] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[18:20:03] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[18:20:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[18:20:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[18:20:04] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[18:20:04] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker

[18:20:04] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker

[18:20:04] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[18:20:07] [Client thread/INFO]: Setting user: Player897

[18:20:18] [Client thread/INFO]: LWJGL Version: 2.9.2

[18:20:19] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[18:20:19] [Client thread/INFO] [FML]: MinecraftForge v11.14.4.1563 Initialized

[18:20:19] [Client thread/INFO] [FML]: Replaced 204 ore recipies

[18:20:20] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[18:20:20] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer

[18:20:20] [Client thread/INFO] [FML]: Searching /Users/cameronreynes/Desktop/Solar/run/mods for mods

[18:20:20] [Client thread/INFO] [cammod]: Mod cammod is missing the required element 'name'. Substituting cammod

[18:20:23] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[18:20:24] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, cammod] at CLIENT

[18:20:24] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, cammod] at SERVER

[18:20:25] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:cammod

[18:20:25] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[18:20:25] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations

[18:20:26] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations

[18:20:26] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations

[18:20:26] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[18:20:26] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json

[18:20:26] [Client thread/INFO] [FML]: Applying holder lookups

[18:20:26] [Client thread/INFO] [FML]: Holder lookups applied

[18:20:26] [Client thread/INFO] [FML]: Injecting itemstacks

[18:20:26] [Client thread/INFO] [FML]: Itemstack injection complete

[18:20:27] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: UP_TO_DATE Target: null

[18:20:28] [sound Library Loader/INFO]: Starting up SoundSystem...

[18:20:28] [Thread-7/INFO]: Initializing LWJGL OpenAL

[18:20:28] [Thread-7/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2016-07-30 18:20:28.783 java[2511:225289] 18:20:28.783 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

[18:20:28] [Thread-7/INFO]: OpenAL initialized.

[18:20:28] [sound Library Loader/INFO]: Sound engine started

[18:20:34] [Client thread/INFO] [FML]: Max texture size: 8192

[18:20:34] [Client thread/INFO]: Created: 16x16 textures-atlas

[18:20:35] [Client thread/ERROR] [FML]: Model definition for location cammod:ToonedOre#normal not found

[18:20:35] [Client thread/ERROR] [FML]: Model definition for location cammod:ToonedOre#inventory not found

[18:20:36] [Client thread/INFO] [FML]: Injecting itemstacks

[18:20:36] [Client thread/INFO] [FML]: Itemstack injection complete

[18:20:37] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods

[18:20:37] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:cammod

[18:20:37] [Client thread/INFO]: SoundSystem shutting down...

[18:20:37] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

[18:20:37] [sound Library Loader/INFO]: Starting up SoundSystem...

[18:20:37] [Thread-9/INFO]: Initializing LWJGL OpenAL

[18:20:37] [Thread-9/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2016-07-30 18:20:37.865 java[2511:225494] 18:20:37.864 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

[18:20:37] [Thread-9/INFO]: OpenAL initialized.

[18:20:38] [sound Library Loader/INFO]: Sound engine started

[18:20:40] [Client thread/INFO] [FML]: Max texture size: 8192

[18:20:42] [Client thread/INFO]: Created: 512x512 textures-atlas

[18:20:42] [Client thread/ERROR] [FML]: Model definition for location cammod:ToonedOre#normal not found

[18:20:42] [Client thread/ERROR] [FML]: Model definition for location cammod:ToonedOre#inventory not found

[18:20:43] [Client thread/ERROR]: ########## GL ERROR ##########

[18:20:43] [Client thread/ERROR]: @ Post startup

[18:20:43] [Client thread/ERROR]: 1281: Invalid value

 

 

Link to comment
Share on other sites

That's because it's specified in the blockstate file, not the model.

 

Eg:

 

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
            "particle": "blocks/planks_oak"
        },
        "model": "harderores:sifter",
        "uvlock": false
    },
    "variants": {
        "normal": [{

        }],
        "inventory": [{
            
        }]
    }
}

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

That's because it's specified in the blockstate file, not the model.

 

Eg:

 

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
            "particle": "blocks/planks_oak"
        },
        "model": "harderores:sifter",
        "uvlock": false
    },
    "variants": {
        "normal": [{

        }],
        "inventory": [{
            
        }]
    }
}

 

No, it's specified in the block model JSON, code below is an example of a vanilla's block model

[spoiler=Beacon Block Model JSON]

{
    "ambientocclusion": false,
    "textures": {
        "particle": "blocks/glass",
        "glass": "blocks/glass",
        "obsidian": "blocks/obsidian",
        "beacon": "blocks/beacon"
    },
    "elements": [
        {   "__comment": "Glass shell",
            "from": [ 0, 0, 0 ],
            "to": [ 16, 16, 16 ],
            "faces": {
                "down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" }
            }
        },
        {   "__comment": "Obsidian base",
            "from": [ 2, 0.1, 2 ],
            "to": [ 14, 3, 14 ],
            "faces": {
                "down":  { "uv": [ 2,  2, 14, 14 ], "texture": "#obsidian" },
                "up":    { "uv": [ 2,  2, 14, 14 ], "texture": "#obsidian" },
                "north": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
                "south": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
                "west":  { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
                "east":  { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" }
            }
        },
        {   "__comment": "Inner beacon texture",
            "from": [ 3, 3, 3 ],
            "to": [ 13, 14, 13 ],
            "faces": {
                "down":  { "uv": [ 3, 3, 13, 13 ], "texture": "#beacon" },
                "up":    { "uv": [ 3, 3, 13, 13 ], "texture": "#beacon" },
                "north": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
                "south": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
                "west":  { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
                "east":  { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" }
            }
        }
    ]
}

 

 

 

It's specified above all the other textures used for the block's appearance, "particle": "modid:blocks/texture_name",.

width=620 height=260http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img]

Till next time. Thank you for delivering funny scenes to Star Trek as Chekov :) . Will always remember you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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