Jump to content

[1.7.10] Compiling Error.


Sqbika

Recommended Posts

I tried to compile my mod, but it threw an Error. I don't know what is the problem.

 

The Error:

 

D:\-=Minecraft Modding=-\HouseStone Essentials\HouseStone-Essentials\HouseStone-Essentials\build\sources\java\com\sqbika\housestoneessentials\client\renderer\tileentity\TileEntityMentfRenderer.java:3: error: package assets.housestoneessentials.models does not e

xist

import assets.housestoneessentials.models.Mentf;

                                        ^

D:\-=Minecraft Modding=-\HouseStone Essentials\HouseStone-Essentials\HouseStone-Essentials\build\sources\java\com\sqbika\housestoneessentials\client\renderer\tileentity\TileEntityMentfRenderer.java:19: error: cannot find symbol

    private final Mentf model;

                  ^         

  symbol:  class Mentf     

  location: class TileEntityMentfRenderer

D:\-=Minecraft Modding=-\HouseStone Essentials\HouseStone-Essentials\HouseStone-Essentials\build\sources\java\com\sqbika\housestoneessentials\client\renderer\tileentity\TileEntityMentfRenderer.java:22: error: cannot find symbol

        this.model = new Mentf();

                        ^ 

  symbol:  class Mentf     

  location: class TileEntityMentfRenderer

Note: D:\-=Minecraft Modding=-\HouseStone Essentials\HouseStone-Essentials\HouseStone-Essentials\build\sources\java\com\sqbika\housestoneessentials\client\gui\ModGuiConfig.java uses unchecked or unsafe operations.

 

 

The Renderer Class:

 

package com.sqbika.housestoneessentials.client.renderer.tileentity;

 

import assets.housestoneessentials.models.Mentf;

import com.sqbika.housestoneessentials.reference.Reference;

import net.minecraft.block.Block;

import net.minecraft.client.Minecraft;

import net.minecraft.client.renderer.OpenGlHelper;

import net.minecraft.client.renderer.Tessellator;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;

import net.minecraft.entity.Entity;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.util.ResourceLocation;

import net.minecraft.world.World;

import org.lwjgl.opengl.GL11;

 

 

public class TileEntityMentfRenderer extends TileEntitySpecialRenderer {

 

    private final Mentf model;

 

    public TileEntityMentfRenderer() {

        this.model = new Mentf();

    }

 

    private void adjustRotatePivotViaMeta(World world, int x, int y, int z) {

        int meta = world.getBlockMetadata(x, y, z);

        GL11.glPushMatrix();

        GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F);

        GL11.glPopMatrix();

    }

 

    @Override

    public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) {

        GL11.glPushMatrix();

        GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);

        ResourceLocation textures = (new ResourceLocation("housestoneessentials:textures/blocks/mentf.png"));

        Minecraft.getMinecraft().renderEngine.bindTexture(textures);

        GL11.glPushMatrix();

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

        this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);

        GL11.glPopMatrix();

        GL11.glPopMatrix();

    }

 

    //Set the lighting stuff, so it changes it's brightness properly.

    private void adjustLightFixture(World world, int i, int j, int k, Block block) {

        Tessellator tess = Tessellator.instance;

        //float brightness = block.getBlockBrightness(world, i, j, k);

        //As of MC 1.7+ block.getBlockBrightness() has become block.getLightValue():

        float brightness = block.getLightValue(world, i, j, k);

        int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);

        int modulousModifier = skyLight % 65536;

        int divModifier = skyLight / 65536;

        tess.setColorOpaque_F(brightness, brightness, brightness);

        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier);

    }

}

 

 

 

I need to register the model class? IDEA itself doesn't throw an exception when I try to run it, it works in IDEA.

Link to comment
Share on other sites

i checked it. Lower-Upper cases are correct. My prediction is that, the builder doesn't see the model file. I don't know why, but I think that is the problem.

 

Another strange this is, when I run MC in Idea, it doesn't give error...

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.