Jump to content

Zyldra

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by Zyldra

  1. I have now changed the build file to this:

     

     

    buildscript {

        repositories {

            mavenCentral()

              maven {

                name = "forge"

                url = "http://files.minecraftforge.net/maven"

            }

            maven {

                name = "sonatype"

                url = "https://oss.sonatype.org/content/repositories/snapshots/"

            }

        }

        dependencies {

            classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'

        }

    }

     

    repositories {

        maven {

                name "chickenbones"

                url "http://chickenbones.net/maven/"'>http://chickenbones.net/maven/"

        }

    }

     

    apply plugin: 'forge'

     

    version = "2.29"

    group= "Zyldra.CC2"

    archivesBaseName = "CC2"

     

    minecraft {

    version = "1.7.10-10.13.2.1230"

    runDir = "run"

    }

     

    dependencies {

        // http://files.minecraftforge.net/CodeChickenLib/

        compile "codechicken:CodeChickenLib:1.7.10-1.1.1.110:dev"

        // http://chickenbones.net/maven

        compile "codechicken:CodeChickenCore:1.7.10-1.0.4.29:dev"

        compile "codechicken:NotEnoughItems:1.7.10-1.0.4.83:dev"

    }

     

    processResources

    {

        // this will ensure that this task is redone when the versions change.

        inputs.property "version", project.version

        inputs.property "mcversion", project.minecraft.version

     

        // replace stuff in mcmod.info, nothing else

        from(sourceSets.main.resources.srcDirs) {

            include 'mcmod.info'

                   

            // replace version and mcversion

            expand 'version':project.version, 'mcversion':project.minecraft.version

        }

           

        // copy everything else, thats not the mcmod.info

        from(sourceSets.main.resources.srcDirs) {

            exclude 'mcmod.info'

        }

    }

     

     

    And now the game starts with Nei.

     

    But it has now no src code attached.

    How do I have to do that?

  2. Maybe the 3 errors I have insite of eclips could be the problem.

    I have:

    Description Resource Path Location Type

    Project 'Minecraft' is missing required library: 'C:\Users\Gebruiker\ChaosCraft\MCP 2\unresolved dependency - net.chickenbones CodeChickenCore 1.7.10-1.0.2.13' Minecraft Build path Build Path Problem

     

    Description Resource Path Location Type

    Project 'Minecraft' is missing required library: 'C:\Users\Gebruiker\ChaosCraft\MCP 2\unresolved dependency - net.chickenbones NotEnoughItems 1.7.10-1.0.2.36' Minecraft Build path Build Path Problem

     

    Description Resource Path Location Type

    The project cannot be built until build path errors are resolved Minecraft Unknown Java Problem

  3. The gradlew eclipse log:

     

     

    The assetDir is deprecated!  Use runDir instead! runDir set to eclipse/assets/..The assetDir is deprecated!  Use runDir instead! runDir set to eclipse/assets/..

     

    ****************************

    Powered By MCP:           

    http://mcp.ocean-labs.de/ 

    Searge, ProfMobius, Fesh0r,

    R4wk, ZeuX, IngisKahn, bspkrs

    MCP Data version : unknown

    ****************************

    :eclipseClasspath

    :eclipseJdt

    :eclipseProject

    :eclipse

     

    BUILD SUCCESSFUL

     

    Total time: 7.63 secs

     

     

     

    Could:

    The assetDir is deprecated!  Use runDir instead! runDir set to eclipse/assets/..The assetDir is deprecated!  Use runDir instead! runDir set to eclipse/assets/..

    Be the source?

  4. I placed the Maven thing insite the build but it doesn't outmaticly build it into eclipse now.

     

    The build file:

     

     

    buildscript {

        repositories {

            mavenCentral()

            maven {

                name = "forge"

                url = "http://files.minecraftforge.net/maven"

            }

            maven {

                name = "sonatype"

                url = "https://oss.sonatype.org/content/repositories/snapshots/"

            }

        maven {

        name 'CB Repo'

        url "http://chickenbones.net/maven/"

        }

        }

        dependencies {

            classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'

        }

    }

     

    apply plugin: 'forge'

     

    version = "2.29"

    group= "Zyldra.CC2" // http://maven.apache.org/guides/mini/guide-naming-conventions.html

    archivesBaseName = "CC2"

     

    minecraft {

        version = "1.7.10-10.13.2.1230"

        assetDir = "eclipse/assets"

    }

     

    dependencies {

        // you may put jars on which you depend on in ./libs

        // or you may define them like so..

        //compile "some.group:artifact:version:classifier"

        //compile "some.group:artifact:version"

        // real examples

        //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env

        //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

     

        // for more info...

        // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html

        // http://www.gradle.org/docs/current/userguide/dependency_management.html

     

    }

     

    processResources

    {

        // this will ensure that this task is redone when the versions change.

        inputs.property "version", project.version

        inputs.property "mcversion", project.minecraft.version

     

        // replace stuff in mcmod.info, nothing else

        from(sourceSets.main.resources.srcDirs) {

            include 'mcmod.info'

                   

            // replace version and mcversion

            expand 'version':project.version, 'mcversion':project.minecraft.version

        }

           

        // copy everything else, thats not the mcmod.info

        from(sourceSets.main.resources.srcDirs) {

            exclude 'mcmod.info'

        }

    }

     

     

     

    What could be the problem becouse I don't know?

  5. I have a problem with exporting my mod that contains a plugin for NEI, the plugin works insite eclipse but when I try to export it then gradlew doesn't know that I extendet the Buildpath.

     

    Here the eror code if you wan't:

     

     

    The assetDir is deprecated!  Use runDir instead! runDir set to eclipse/..The assetDir is deprecated!  Use runDir instead! runDir set to eclipse/..

     

    ****************************

    Powered By MCP:           

    http://mcp.ocean-labs.de/ 

    Searge, ProfMobius, Fesh0r,

    R4wk, ZeuX, IngisKahn, bspkrs

    MCP Data version : unknown

    ****************************

    :compileApiJava UP-TO-DATE

    :processApiResources UP-TO-DATE

    :apiClasses UP-TO-DATE

    :sourceMainJava UP-TO-DATE

    :compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.6

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:4: error: package codechicken.nei.recipe does not exist

    import codechicken.nei.recipe.DefaultOverlayHandler;

                                ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:5: error: package codechicken.nei.recipe does not exist

    import codechicken.nei.recipe.FurnaceRecipeHandler;

                                ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:6: error: package codechicken.nei.api does not exist

    import codechicken.nei.api.API;

                              ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:13: error: package codechicken.nei does not exist

    import codechicken.nei.NEIServerUtils;

                          ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:14: error: package codechicken.nei does not exist

    import codechicken.nei.PositionedStack;

                          ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:15: error: package codechicken.nei.recipe does not exist

    import codechicken.nei.recipe.TemplateRecipeHandler;

                                ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:16: error: package codechicken.nei.recipe.TemplateRecipeHandler does not exist

    import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe;

                                                      ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:18: error: cannot find symbol

    public class RecipeInfusionAltar extends TemplateRecipeHandler {

                                            ^

      symbol: class TemplateRecipeHandler

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:20: error: cannot find symbol

    public class CachedInfusionRecipe extends CachedRecipe

                                              ^

      symbol:  class CachedRecipe

      location: class RecipeInfusionAltar

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:42: error: cannot find symbol

    public List<PositionedStack> getIngredients() {

                ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:56: error: cannot find symbol

    public PositionedStack getResult() {

          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:60: error: cannot find symbol

    PositionedStack ingred1;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:61: error: cannot find symbol

    PositionedStack ingred2;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:62: error: cannot find symbol

    PositionedStack ingred3;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:63: error: cannot find symbol

    PositionedStack ingred4;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:64: error: cannot find symbol

    PositionedStack ingred5;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:65: error: cannot find symbol

    PositionedStack ingred6;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:66: error: cannot find symbol

    PositionedStack ingred7;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:67: error: cannot find symbol

    PositionedStack ingred8;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:68: error: cannot find symbol

    PositionedStack wand;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:69: error: cannot find symbol

    PositionedStack result;

    ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:16: error: cannot find symbol

    API.registerGuiOverlay(GuiInfusionAltar.class, "InfusionCrafting");

    ^

      symbol:  variable API

      location: class NEICompat

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:17: error: cannot find symbol

    API.registerGuiOverlayHandler(GuiInfusionAltar.class, new DefaultOverlayHandler(), "InfusionCrafting");

                                                              ^

      symbol:  class DefaultOverlayHandler

      location: class NEICompat

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:17: error: cannot find symbol

    API.registerGuiOverlayHandler(GuiInfusionAltar.class, new DefaultOverlayHandler(), "InfusionCrafting");

    ^

      symbol:  variable API

      location: class NEICompat

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:19: error: cannot find symbol

    API.registerRecipeHandler(new RecipeInfusionAltar());

    ^

      symbol:  variable API

      location: class NEICompat

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\NEICompat.java:20: error: cannot find symbol

    API.registerUsageHandler(new RecipeInfusionAltar());

    ^

      symbol:  variable API

      location: class NEICompat

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:30: error: cannot find symbol

    if(ingred[0]!=null)this.ingred1 = new PositionedStack(ingred[0], 3, -1);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:31: error: cannot find symbol

    if(ingred[1]!=null)this.ingred2 = new PositionedStack(ingred[1], 3, 16);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:32: error: cannot find symbol

    if(ingred[2]!=null)this.ingred3 = new PositionedStack(ingred[2], 3, 34);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:33: error: cannot find symbol

    if(ingred[3]!=null)this.ingred4 = new PositionedStack(ingred[3], 3, 52);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:34: error: cannot find symbol

    if(ingred[4]!=null)this.ingred5 = new PositionedStack(ingred[4], 147, -1);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:35: error: cannot find symbol

    if(ingred[5]!=null)this.ingred6 = new PositionedStack(ingred[5], 147, 16);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:36: error: cannot find symbol

    if(ingred[6]!=null)this.ingred7 = new PositionedStack(ingred[6], 147, 34);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:37: error: cannot find symbol

    if(ingred[7]!=null)this.ingred8 = new PositionedStack(ingred[7], 147, 52);

                                          ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:38: error: cannot find symbol

    if(ingred[8]!=null)this.wand = new PositionedStack(ingred[8], 39, 52);

                                      ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:39: error: cannot find symbol

    this.result = new PositionedStack(result, 75, 16);

                      ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:43: error: cannot find symbol

    ArrayList<PositionedStack> recipestacks = new ArrayList<PositionedStack>();

              ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:43: error: cannot find symbol

    ArrayList<PositionedStack> recipestacks = new ArrayList<PositionedStack>();

                                                            ^

      symbol:  class PositionedStack

      location: class RecipeInfusionAltar.CachedInfusionRecipe

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:72: error: method does not override or implement a method from a supertype

    @Override

    ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:79: error: cannot find symbol

    arecipes.add(new CachedInfusionRecipe(is, result));

    ^

      symbol:  variable arecipes

      location: class RecipeInfusionAltar

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:83: error: method does not override or implement a method from a supertype

    @Override

    ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:91: error: cannot find symbol

    arecipes.add(new CachedInfusionRecipe(is, recipe.output.copy()));

    ^

      symbol:  variable arecipes

      location: class RecipeInfusionAltar

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:95: error: method does not override or implement a method from a supertype

    @Override

    ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:100: error: method does not override or implement a method from a supertype

    @Override

    ^

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:103: error: cannot find symbol

            drawProgressBar(40, 34, 176, 0, 14, 14, 0.0F, 7);

            ^

      symbol:  method drawProgressBar(int,int,int,int,int,int,float,int)

      location: class RecipeInfusionAltar

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:104: error: cannot find symbol

            drawProgressBar(35, 15, 176, 14, 24, 16, 35, 0);

            ^

      symbol:  method drawProgressBar(int,int,int,int,int,int,int,int)

      location: class RecipeInfusionAltar

    C:\Users\Gebruiker\ChaosCraft\MCP 2\build\sources\java\Zyldra\CC2\plugins\NEI\RecipeInfusionAltar.java:107: error: method does not override or implement a method from a supertype

    @Override

    ^

    Note: Some input files use or override a deprecated API.

    Note: Recompile with -Xlint:deprecation for details.

    Note: Some input files use unchecked or unsafe operations.

    Note: Recompile with -Xlint:unchecked for details.

    47 errors

    1 warning

    FAILED

     

    FAILURE: Build failed with an exception.

     

    * What went wrong:

    Execution failed for task ':compileJava'.

    > Compilation failed; see the compiler error output for details.

     

    * Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

     

    BUILD FAILED

     

    Total time: 8.263 secs

     

     

     

    What could I do?

  6. width=100 height=52http://static.planetminecraft.com/files/resource_media/screenshot/1418/small/chaoscraftfrontpage_thumb.jpg[/img]

     

    A mod that adds skills into minecraft:

    Strength: You can train it with doing damage and it will make you do more damage how higher level you are!

    Constitution: You can train it by damaging yourelf and it will give you more HP how higher level you are!

    Fishing: You can fish up fishes that can be cooked and they heal HP!

     

    The mod adds some altars as well:

    InfusionAltar: You can craft stuff with!

    ChaosSpawner: You can spawn mobs with it and kill them at the same time!

    ChaosTable: You can autocraft stuff with (Known Bug: The table doesn't support returning items)!

     

    Mod download and more in the link below:

    http://www.planetminecraft.com/mod/chaoscraft-2849881/

     

    I hope you will enjoy my mod :)

  7. I have a problem with the way minecraft renders blocks!

     

    I need a way to give a block an texture from another block bassed on NBT.

    I find one, but that only works if forge does implement the codes below here.

     

    These add things.

    package net.minecraft.client.renderer; RenderBlocks.java

    public void renderBlockAsItem(Block p_147800_1_, int p_147800_2_, float p_147800_3_, ItemStack p_147800_4_)

        {

        renderBlockAsItem(Block.getBlockFromItem(p_147800_1_.getBlockRenderingInInventory(p_147800_4_).getItem()), p_147800_1_.getBlockRenderingInInventory(p_147800_4_).getItemDamage(), p_147800_3_);

        }

     

    package net.minecraft.block; Block.java

    public ItemStack getBlockRenderingInInventory(ItemStack itemstack)

        {

        return itemstack;

        }

     

    These change things, Look at >//Changed< for changes.

    package net.minecraft.client.renderer; ItemRenderer.java

    public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3, ItemRenderType type)

        {

            GL11.glPushMatrix();

            TextureManager texturemanager = this.mc.getTextureManager();

            Item item = par2ItemStack.getItem();

            Block block = Block.getBlockFromItem(item);

     

            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(par2ItemStack, type);

            if (customRenderer != null)

            {

                texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));

                ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksIr, par1EntityLivingBase, par2ItemStack);

            }

            else if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.renderItemIn3d(block.getRenderType()))

            {

                texturemanager.bindTexture(texturemanager.getResourceLocation(0));

     

                if (par2ItemStack != null && par2ItemStack.getItem() instanceof ItemCloth)

                {

                    GL11.glEnable(GL11.GL_BLEND);

                    GL11.glDepthMask(false);

                    OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                    this.renderBlocksIr.renderBlockAsItem(block, par2ItemStack.getItemDamage(), 1.0F, par2ItemStack);//Changed

                    GL11.glDepthMask(true);

                    GL11.glDisable(GL11.GL_BLEND);

                }

                else

                {

                    this.renderBlocksIr.renderBlockAsItem(block, par2ItemStack.getItemDamage(), 1.0F, par2ItemStack);//Changed

                }

            }

            else

            {

                IIcon iicon = par1EntityLivingBase.getItemIcon(par2ItemStack, par3);

     

                if (iicon == null)

                {

                    GL11.glPopMatrix();

                    return;

                }

     

                texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));

                TextureUtil.func_147950_a(false, false);

                Tessellator tessellator = Tessellator.instance;

                float f = iicon.getMinU();

                float f1 = iicon.getMaxU();

                float f2 = iicon.getMinV();

                float f3 = iicon.getMaxV();

                float f4 = 0.0F;

                float f5 = 0.3F;

                GL11.glEnable(GL12.GL_RESCALE_NORMAL);

                GL11.glTranslatef(-f4, -f5, 0.0F);

                float f6 = 1.5F;

                GL11.glScalef(f6, f6, f6);

                GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);

                GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);

                GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);

                renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);

     

                if (par2ItemStack.hasEffect(par3))

                {

                    GL11.glDepthFunc(GL11.GL_EQUAL);

                    GL11.glDisable(GL11.GL_LIGHTING);

                    texturemanager.bindTexture(RES_ITEM_GLINT);

                    GL11.glEnable(GL11.GL_BLEND);

                    OpenGlHelper.glBlendFunc(768, 1, 1, 0);

                    float f7 = 0.76F;

                    GL11.glColor4f(0.5F * f7, 0.25F * f7, 0.8F * f7, 1.0F);

                    GL11.glMatrixMode(GL11.GL_TEXTURE);

                    GL11.glPushMatrix();

                    float f8 = 0.125F;

                    GL11.glScalef(f8, f8, f8);

                    float f9 = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;

                    GL11.glTranslatef(f9, 0.0F, 0.0F);

                    GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);

                    renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);

                    GL11.glPopMatrix();

                    GL11.glPushMatrix();

                    GL11.glScalef(f8, f8, f8);

                    f9 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;

                    GL11.glTranslatef(-f9, 0.0F, 0.0F);

                    GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);

                    renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);

                    GL11.glPopMatrix();

                    GL11.glMatrixMode(GL11.GL_MODELVIEW);

                    GL11.glDisable(GL11.GL_BLEND);

                    GL11.glEnable(GL11.GL_LIGHTING);

                    GL11.glDepthFunc(GL11.GL_LEQUAL);

                }

     

                GL11.glDisable(GL12.GL_RESCALE_NORMAL);

                texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));

                TextureUtil.func_147945_b();

            }

     

            GL11.glPopMatrix();

        }

    package net.minecraft.client.renderer.entity; RenderItem.java

    public void doRender(EntityItem par1EntityItem, double par2, double par4, double par6, float par8, float par9)

        {

            ItemStack itemstack = par1EntityItem.getEntityItem();

     

            if (itemstack.getItem() != null)

            {

                this.bindEntityTexture(par1EntityItem);

                this.random.setSeed(187L);

                GL11.glPushMatrix();

                float f2 = shouldBob() ? MathHelper.sin(((float)par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F : 0F;

                float f3 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI);

                byte b0 = 1;

     

                if (par1EntityItem.getEntityItem().stackSize > 1)

                {

                    b0 = 2;

                }

     

                if (par1EntityItem.getEntityItem().stackSize > 5)

                {

                    b0 = 3;

                }

     

                if (par1EntityItem.getEntityItem().stackSize > 20)

                {

                    b0 = 4;

                }

     

                if (par1EntityItem.getEntityItem().stackSize > 40)

                {

                    b0 = 5;

                }

     

                b0 = getMiniBlockCount(itemstack, b0);

     

                GL11.glTranslatef((float)par2, (float)par4 + f2, (float)par6);

                GL11.glEnable(GL12.GL_RESCALE_NORMAL);

                float f6;

                float f7;

                int k;

     

                if (ForgeHooksClient.renderEntityItem(par1EntityItem, itemstack, f2, f3, random, renderManager.renderEngine, field_147909_c, b0))

                {

                    ;

                }

                else // Code Style break here to prevent the patch from editing this line

                if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))

                {

                    Block block = Block.getBlockFromItem(itemstack.getItem());

                    GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);

     

                    if (renderInFrame)

                    {

                        GL11.glScalef(1.25F, 1.25F, 1.25F);

                        GL11.glTranslatef(0.0F, 0.05F, 0.0F);

                        GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);

                    }

     

                    float f9 = 0.25F;

                    k = block.getRenderType();

     

                    if (k == 1 || k == 19 || k == 12 || k == 2)

                    {

                        f9 = 0.5F;

                    }

     

                    if (block.getRenderBlockPass() > 0)

                    {

                        GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);

                        GL11.glEnable(GL11.GL_BLEND);

                        OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                    }

     

                    GL11.glScalef(f9, f9, f9);

     

                    for (int l = 0; l < b0; ++l)

                    {

                        GL11.glPushMatrix();

     

                        if (l > 0)

                        {

                            f6 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;

                            f7 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;

                            float f8 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;

                            GL11.glTranslatef(f6, f7, f8);

                        }

     

                        this.renderBlocksRi.renderBlockAsItem(block, itemstack.getItemDamage(), 1.0F, itemstack);//Changed

                        GL11.glPopMatrix();

                    }

     

                    if (block.getRenderBlockPass() > 0)

                    {

                        GL11.glDisable(GL11.GL_BLEND);

                    }

                }

                else

                {

                    float f5;

     

                    if (/*itemstack.getItemSpriteNumber() == 1 &&*/ itemstack.getItem().requiresMultipleRenderPasses())

                    {

                        if (renderInFrame)

                        {

                            GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);

                            GL11.glTranslatef(0.0F, -0.05F, 0.0F);

                        }

                        else

                        {

                            GL11.glScalef(0.5F, 0.5F, 0.5F);

                        }

     

                        for (int j = 0; j < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++j)

                        {

                            this.random.setSeed(187L);

                            IIcon iicon1 = itemstack.getItem().getIcon(itemstack, j);

     

                            if (this.renderWithColor)

                            {

                                k = itemstack.getItem().getColorFromItemStack(itemstack, j);

                                f5 = (float)(k >> 16 & 255) / 255.0F;

                                f6 = (float)(k >> 8 & 255) / 255.0F;

                                f7 = (float)(k & 255) / 255.0F;

                                GL11.glColor4f(f5, f6, f7, 1.0F);

                                this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, f5, f6, f7, j);

                            }

                            else

                            {

                                this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, 1.0F, 1.0F, 1.0F, j);

                            }

                        }

                    }

                    else

                    {

                        if (itemstack != null && itemstack.getItem() instanceof ItemCloth)

                        {

                            GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);

                            GL11.glEnable(GL11.GL_BLEND);

                            OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                        }

     

                        if (renderInFrame)

                        {

                            GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);

                            GL11.glTranslatef(0.0F, -0.05F, 0.0F);

                        }

                        else

                        {

                            GL11.glScalef(0.5F, 0.5F, 0.5F);

                        }

     

                        IIcon iicon = itemstack.getIconIndex();

     

                        if (this.renderWithColor)

                        {

                            int i = itemstack.getItem().getColorFromItemStack(itemstack, 0);

                            float f4 = (float)(i >> 16 & 255) / 255.0F;

                            f5 = (float)(i >> 8 & 255) / 255.0F;

                            f6 = (float)(i & 255) / 255.0F;

                            this.renderDroppedItem(par1EntityItem, iicon, b0, par9, f4, f5, f6);

                        }

                        else

                        {

                            this.renderDroppedItem(par1EntityItem, iicon, b0, par9, 1.0F, 1.0F, 1.0F);

                        }

     

                        if (itemstack != null && itemstack.getItem() instanceof ItemCloth)

                        {

                            GL11.glDisable(GL11.GL_BLEND);

                        }

                    }

                }

     

                GL11.glDisable(GL12.GL_RESCALE_NORMAL);

                GL11.glPopMatrix();

            }

        }

    public void renderItemIntoGUI(FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5, boolean renderEffect)

        {

            int k = par3ItemStack.getItemDamage();

            Object object = par3ItemStack.getIconIndex();

            GL11.glEnable(GL11.GL_BLEND);

            OpenGlHelper.glBlendFunc(770, 771, 1, 0);

            int l;

            float f;

            float f3;

            float f4;

     

            if (par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(par3ItemStack.getItem()).getRenderType()))

            {

                par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);

                Block block = Block.getBlockFromItem(par3ItemStack.getItem());

                GL11.glPushMatrix();

                GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);

                GL11.glScalef(10.0F, 10.0F, 10.0F);

                GL11.glTranslatef(1.0F, 0.5F, 1.0F);

                GL11.glScalef(1.0F, 1.0F, -1.0F);

                GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);

                GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);

                l = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, 0);

                f3 = (float)(l >> 16 & 255) / 255.0F;

                f4 = (float)(l >> 8 & 255) / 255.0F;

                f = (float)(l & 255) / 255.0F;

     

                if (this.renderWithColor)

                {

                    GL11.glColor4f(f3, f4, f, 1.0F);

                }

     

                GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);

                this.renderBlocksRi.useInventoryTint = this.renderWithColor;

                this.renderBlocksRi.renderBlockAsItem(block, k, 1.0F, par3ItemStack);//Changed

                this.renderBlocksRi.useInventoryTint = true;

                GL11.glPopMatrix();

            }

            else if (par3ItemStack.getItem().requiresMultipleRenderPasses())

            {

                GL11.glDisable(GL11.GL_LIGHTING);

                GL11.glEnable(GL11.GL_ALPHA_TEST);

                par2TextureManager.bindTexture(TextureMap.locationItemsTexture);

                GL11.glDisable(GL11.GL_ALPHA_TEST);

                GL11.glDisable(GL11.GL_TEXTURE_2D);

                GL11.glEnable(GL11.GL_BLEND);

                OpenGlHelper.glBlendFunc(0, 0, 0, 0);

                GL11.glColorMask(false, false, false, true);

                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

                Tessellator tessellator = Tessellator.instance;

                tessellator.startDrawingQuads();

                tessellator.setColorOpaque_I(-1);

                tessellator.addVertex((double)(par4 - 2), (double)(par5 + 18), (double)this.zLevel);

                tessellator.addVertex((double)(par4 + 18), (double)(par5 + 18), (double)this.zLevel);

                tessellator.addVertex((double)(par4 + 18), (double)(par5 - 2), (double)this.zLevel);

                tessellator.addVertex((double)(par4 - 2), (double)(par5 - 2), (double)this.zLevel);

                tessellator.draw();

                GL11.glColorMask(true, true, true, true);

                GL11.glEnable(GL11.GL_TEXTURE_2D);

                GL11.glEnable(GL11.GL_ALPHA_TEST);

     

                Item item = par3ItemStack.getItem();

                for (l = 0; l < item.getRenderPasses(k); ++l)

                {

                    OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                    par2TextureManager.bindTexture(item.getSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);

                    IIcon iicon = item.getIcon(par3ItemStack, l);

                    int i1 = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, l);

                    f = (float)(i1 >> 16 & 255) / 255.0F;

                    float f1 = (float)(i1 >> 8 & 255) / 255.0F;

                    float f2 = (float)(i1 & 255) / 255.0F;

     

                    if (this.renderWithColor)

                    {

                        GL11.glColor4f(f, f1, f2, 1.0F);

                    }

     

                    GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, ad renderEffect can derp them up.

                    GL11.glEnable(GL11.GL_ALPHA_TEST);

     

                    this.renderIcon(par4, par5, iicon, 16, 16);

     

                    GL11.glDisable(GL11.GL_ALPHA_TEST);

                    GL11.glEnable(GL11.GL_LIGHTING);

     

                    if (renderEffect && par3ItemStack.hasEffect(l))

                    {

                        renderEffect(par2TextureManager, par4, par5);

                    }

                }

     

                GL11.glDisable(GL11.GL_ALPHA_TEST);

                GL11.glEnable(GL11.GL_LIGHTING);

            }

            else

            {

                GL11.glDisable(GL11.GL_LIGHTING);

                ResourceLocation resourcelocation = par2TextureManager.getResourceLocation(par3ItemStack.getItemSpriteNumber());

                par2TextureManager.bindTexture(resourcelocation);

     

                if (object == null)

                {

                    object = ((TextureMap)Minecraft.getMinecraft().getTextureManager().getTexture(resourcelocation)).getAtlasSprite("missingno");

                }

     

                l = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, 0);

                f3 = (float)(l >> 16 & 255) / 255.0F;

                f4 = (float)(l >> 8 & 255) / 255.0F;

                f = (float)(l & 255) / 255.0F;

     

                if (this.renderWithColor)

                {

                    GL11.glColor4f(f3, f4, f, 1.0F);

                }

     

                GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, ad renderEffect can derp them up.

                GL11.glEnable(GL11.GL_ALPHA_TEST);

     

                this.renderIcon(par4, par5, (IIcon)object, 16, 16);

     

                GL11.glDisable(GL11.GL_ALPHA_TEST);

                GL11.glEnable(GL11.GL_LIGHTING);

     

                if (renderEffect && par3ItemStack.hasEffect(0))

                {

                    renderEffect(par2TextureManager, par4, par5);

                }

                GL11.glEnable(GL11.GL_LIGHTING);

            }

     

            GL11.glEnable(GL11.GL_CULL_FACE);

        }

     

    I hope you can understand what it does :)

  8. I'm building a drop that contains the TileEntity of a block.

     

    I already have the itemstack giving the name like this:

     

            @Override

            public String getItemStackDisplayName(ItemStack is)

    {

    NBTTagCompound nbtb = new NBTTagCompound();

    nbtb = is.stackTagCompound;

    if(nbtb != null)

    {

    String name = nbtb.getString("WrenchDrop_NAME");

    if(name != null)

    {

    return name;

    }

    }

    return "No Block";

    }

     

    I need some way to give the Block a texture bassed on the NBT when it is in a ItemStack (in inventory of player).

     

    Thanks if you can make it possible :)

×
×
  • Create New...

Important Information

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