• 0

    posted a message on Block won't drop ToolMaterial!!
    I'll Try it!
    What do I import?
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    Thank you to everyone who helped me with my various problems. Can I have another bit of advice?



    What the crap does this


    ---- Minecraft Crash Report ----
    // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

    Time: 1/10/15 4:55 PM
    Description: Initializing game

    java.lang.ClassCastException: net.minecraft.client.renderer.texture.TextureAtlasSprite cannot be cast to javax.swing.Icon
    at com.example.percyjackson.GreekBow.registerIcons(GreekBow.java:173)
    at net.minecraft.client.renderer.texture.TextureMap.registerIcons(TextureMap.java:331)
    at net.minecraft.client.renderer.texture.TextureMap.<init>(TextureMap.java:57)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:570)
    at net.minecraft.client.Minecraft.run(Minecraft.java:880)
    at net.minecraft.client.main.Main.main(Main.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------

    -- Head --
    Stacktrace:
    at com.example.percyjackson.GreekBow.registerIcons(GreekBow.java:173)
    at net.minecraft.client.renderer.texture.TextureMap.registerIcons(TextureMap.java:331)
    at net.minecraft.client.renderer.texture.TextureMap.<init>(TextureMap.java:57)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:570)

    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:880)
    at net.minecraft.client.main.Main.main(Main.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

    -- System Details --
    Details:
    Minecraft Version: 1.7.2
    Operating System: Mac OS X (x86_64) version 10.10.1
    Java Version: 1.7.0_71, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 694848920 bytes (662 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 6 mods loaded, 6 mods active
    mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
    FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
    Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
    CodeChickenCore{1.0.2.10} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized
    NotEnoughItems{1.0.2.14} [Not Enough Items] (NotEnoughItems-1.7.2-1.0.2.14-universal.jar) Unloaded->Constructed->Pre-initialized
    percyjackson{0.1} [The Percy Jackson Mod] (bin) Unloaded->Constructed->Pre-initialized
    Launched Version: 1.6
    LWJGL: 2.9.1
    OpenGL: NVIDIA GeForce GT 330M OpenGL Engine GL version 2.1 NVIDIA-10.0.19 310.90.10.05b12, NVIDIA Corporation
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: []
    Current Language: ~~ERROR~~ NullPointerException: null
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
    Anisotropic Filtering: Off (1)

    mean?
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    I got it to work!!!!
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    ok
    it is before it though, which is funny because it's still not working.
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    how do you initialize a creative tab?
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    Any Ideas?
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    public static CreativeTabs toolTab = new CreativeTabs("toolTab") {

    @Override

    @SideOnly(Side.CLIENT)

    public Item getTabIconItem() {

    return Percyjackson.CBronzeAxe;

    }

    };
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    OOOOOHHHHH, hahahaha silly me!!

    Doesn't work..... I have this code for CBronzeAxe

    [quote] package com.example.percyjackson;

    import net.minecraft.item.Item;
    import net.minecraft.item.ItemAxe;

    public class CBronzeAxe extends ItemAxe {
    public CBronzeAxe(ToolMaterial CBronzeIngot) {
    super(CBronzeIngot);
    this.setCreativeTab(Percyjackson.toolTab);
    this.setTextureName(Percyjackson.MODID + ":" + "CAxe");
    }
    }
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    UUUUmmm.... So I got the axe in game and it works but I can't assign it a creative tab.
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    Got it, that really helped!! :Diamond:
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    Thanks!!! :Diamond:

    EDIT: My class OreCBronze gives me this error: Type mismatch: cannot convert from Item.ToolMaterial to Item

    With this code:
    @Override
    public Item getItemDropped(int metadata, Random random, int fortune) {
    return Percyjackson.CBronzeIngot;
    }

    The error is in red.
    Posted in: Modification Development
  • 0

    posted a message on Block won't drop ToolMaterial!!
    I made a custom Ingot called celestial bronze Ingot, and then I wanted to make celestial bronze tools. So I changed the type of celestial bronze from Item to ToolMaterial. When I tried to make the celestial bronze ore drop the celestial bronze ingot, it gave me an error and told me that it could only drop items. Help!
    Posted in: Modification Development
  • 0

    posted a message on [block] cannot be resolved or is not a field - eclipse
    Thanks (sorry for late reply) it worked!
    Posted in: Modification Development
  • 0

    posted a message on [block] cannot be resolved or is not a field - eclipse
    What do you mean how do you expect it to work? it does work!!! it shows up in creative.
    Here is a screen shot.
    Posted in: Modification Development
  • 0

    posted a message on [block] cannot be resolved or is not a field - eclipse
    OK, so I got that working, now this doesn't wok!!!! I have this code:



    package com.example.PercyJackson.blocks;

    import com.example.PercyJackson.PercyJackson;

    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.util.IIcon;

    public class BlockMarble extends Block {

    public IIcon Side0;
    public IIcon Side1;
    public IIcon Side2;
    public IIcon Side3;
    public IIcon Side4;
    public IIcon Side5;

    public BlockMarble(int i, Material rock) {
    super(rock);
    this.setCreativeTab(CreativeTabs.tabBlock);
    this.setStepSound(soundTypeStone);
    this.setHardness(4f);
    this.setResistance(10f);
    this.setLightLevel(0.8f);
    this.setBlockName("Marble");
    }

    public void registerBlockIcons(IIconRegister icon) {
    Side0 = icon.registerIcon(PercyJackson.MODID + ":Side0");
    Side1 = icon.registerIcon(PercyJackson.MODID + ":Side1");
    Side2 = icon.registerIcon(PercyJackson.MODID + ":Side2");
    Side3 = icon.registerIcon(PercyJackson.MODID + ":Side3");
    Side4 = icon.registerIcon(PercyJackson.MODID + ":Side4");
    Side5 = icon.registerIcon(PercyJackson.MODID + ":Side5");
    }

    public IIcon getIcon(int side, int meta)
    {
    if (side == 0) {
    return Side0;
    } else if (side == 1) {
    return Side1;
    }else if (side == 2) {
    return Side2;
    }else if (side == 3) {
    return Side3;
    }else if (side == 4) {
    return Side4;
    }else if (side == 5) {
    return Side5;
    }
    return null;

    }

    }

    And the texture is still pink and black squares!!!!!!! (I'll post the rest of the code files later)
    Here is the creative tab that its in:



    package com.example.PercyJackson.CreativeTabs;

    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;

    public class PJBlocks extends CreativeTabs {

    public PJBlocks(int par1, String par2Str) {
    super(par1, par2Str);
    }

    @Override
    public Item getTabIconItem() {
    return null;
    }

    }
    Here is the Main Java class:



    package com.example.PercyJackson;

    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.init.Items;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;

    import com.example.PercyJackson.CreativeTabs.PJBlocks;
    import com.example.PercyJackson.blocks.BlockMarble;
    import com.example.PercyJackson.proxy.ProxyCommon;

    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.EventHandler;
    import cpw.mods.fml.common.Mod.Instance;
    import cpw.mods.fml.common.SidedProxy;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.common.registry.LanguageRegistry;

    @Mod(modid = PercyJackson.MODID, version = PercyJackson.VERSION)
    public class PercyJackson {

    // Mod Info
    public static final String MODID = "PercyJackson";
    public static final String VERSION = "1.0";

    // Blocks
    public static final Block Marble = new BlockMarble(2000, Material.rock);

    // Creative Tab Greek Weapons
    public static CreativeTabs Gweapons = new CreativeTabs("greekWeapons") {
    public Item getTabIconItem() {
    return new Item();
    }
    };

    // Creative Tab Roman Weapons
    public static CreativeTabs Rweapons = new CreativeTabs("romanWeapons") {
    public Item getTabIconItem() {
    return new Item();
    }
    };

    // Creative Tab Blocks
    public static CreativeTabs PJBlocks = new CreativeTabs("percyJacksonBlocks") {
    public Item getTabIconItem() {
    return new Item();
    }
    };

    // Instance
    @Instance(value = MODID)
    public static PercyJackson instance;

    // Sided Proxy
    @SidedProxy(clientSide = "com.example.PercyJackson.proxy.ProxyClient", serverSide = "com.example.PercyJackson.proxy.proxyCommon")
    public static ProxyCommon proxy;

    // Eventhandler
    @SuppressWarnings("deprecation")
    @EventHandler
    public void init(FMLInitializationEvent event) {


    // Crafting Recipes
    GameRegistry.registerBlock(Marble, "Marble").setCreativeTab(PJBlocks);

    LanguageRegistry.addName(Marble, "Marble");
    }

    // Eventhandler
    @EventHandler
    public void load1(FMLInitializationEvent event) {
    proxy.registerRenderers();
    };

    // Eventhandler
    @EventHandler
    public void load(FMLInitializationEvent event) {
    LanguageRegistry.instance().addStringLocalization(
    "itemGroup.greekWeapons", "en_US", "Greek Weapons");
    LanguageRegistry.instance().addStringLocalization(
    "itemGroup.romanWeapons", "en_US", "Roman Weapons");
    LanguageRegistry.instance().addStringLocalization(
    "itemGroup.percyJacksonBlocks", "en_US",
    "Percy Jackson Blocks");
    }
    }
    And here is the mcmod.info



    [

    {

    "modid": "PercyJackson",

    "name": "Example Mod",

    "description": "Most epic Percy Jackson Mod",

    "version": "${1.0}",

    "mcversion": "${1.7.2}",

    "url": "www.iamthethomas.weebly.com",

    "updateUrl": "www.iamthethomas.weebly.com",

    "authorList": ["Rippingtax"],

    "credits": "Rippingtax & Kathleen",

    "logoFile": "",

    "screenshots": [],

    "dependencies": []

    }

    ]
    The pictures are in a package in the main src folder called assets.PercyJackson.textures.blocks and are aptly named: Side0 Side1 Side2 Side3 Side4 Side5

    The assets.PercyJackson.textures.blocks package is in the same folder as the com.example.PercyJackson package.
    Posted in: Modification Development
  • To post a comment, please or register a new account.