Jump to content

Recommended Posts

Posted

Ouch ,it works now, no error, but it still showing the 16p image of block.

How to create client proxy? I tried before, but that didnt worked ... ;)

Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM]

If you want to use my API please give me a Karma/Thank you

Sorry for some bad words ´cause I am not a walkin´ library!

Posted

honestly just look at the wiki, its pretty straightdoward.

public class MainMod{
@SidedProxy(clientSide = "com.hydroflame.mod.ForgeRevClientProxy", serverSide = "com.hydroflame.mod.ForgeRevCommonProxy")
public static CommonProxy proxy;
//bunch of function
///......
//...
//...
}

 

make a class CommonProxy and one ClientProxy that extends the CommonProxy one

 

then make a function called registerRenderers() in both and but the rendering code in the client one

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

OK, I created the ClientProxy and CommonProxy, but still it doesnt work ...

So, the classes again :D :

Client proxy:

 

  Reveal hidden contents

 

Common Proxy:

 

  Reveal hidden contents

 

Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM]

If you want to use my API please give me a Karma/Thank you

Sorry for some bad words ´cause I am not a walkin´ library!

Posted

So, the small problem with invetory rendering is not solved, butt, I have there another problem.

I trying to make the machine working with my "WIP" electric site.

The way, it is made is: You need to place the machine on top of the power interface (if not, you cant open the gui of machine, or do anything), this is not the problem. I rewrited one method, and inserted in to, when there is that special block, set the currentItemBurnTime to 200 and remove 200 energy from that block ...Classes:

MachinePoweredMelter

  Reveal hidden contents

 

TE_PoweredMelter

 

  Reveal hidden contents

 

MachinePowerInterface

 

  Reveal hidden contents

 

TE_PowerInterface

 

  Reveal hidden contents

 

 

When I solve this problem, I wish I do the upgrade gui :D

Thanks for you time!

Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM]

If you want to use my API please give me a Karma/Thank you

Sorry for some bad words ´cause I am not a walkin´ library!

Posted
  On 6/28/2013 at 8:23 AM, mar21 said:

 

                int meta = te.getBlockMetadata();
                int rotation = 0;
                if(meta == 2){rotation = 180;}//SOUTH
                if(meta == 3){rotation = 0;}//NORTH
                if(meta == 4){rotation = -90;}//EAST
                if(meta == 5){rotation = 90;}//WEST
                GL11.glRotatef(rotation, 0, 1, 0);

 

That code is giving me a crash.

 

Crash report:

 

  Reveal hidden contents

 

 

Error log:

 

  Reveal hidden contents

 

Eclipse log:

 

  Reveal hidden contents

 

 

ItemTrafficLightRenderer.java:

 

  Reveal hidden contents

 

 

TileEntityTrafficLightRenderer.java:

 

  Reveal hidden contents

 

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

In your file, you posted, the TileEntityTrafficLightRenderer.java

I think you need this imports:

import net.minecraft.block.Block;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

Try this:

 

  Reveal hidden contents

 

And try the CTRL + SHIFT + O

Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM]

If you want to use my API please give me a Karma/Thank you

Sorry for some bad words ´cause I am not a walkin´ library!

Posted
  On 6/29/2013 at 5:16 PM, mar21 said:

In your file, you posted, the TileEntityTrafficLightRenderer.java

I think you need this imports:

import net.minecraft.block.Block;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

Try this:

 

  Reveal hidden contents

 

And try the CTRL + SHIFT + O

 

It still gives me an error:

  Reveal hidden contents

 

 

On the line 11 before the end it says:

at mod.larsg310.bd.render.ItemTrafficLightRenderer.renderItem(ItemTrafficLightRenderer.java:30)

And that is this line:

TileEntityRenderer.instance.renderTileEntityAt(new TileEntityTrafficLight(), 0.0D, 0.0D, 0.0D, 0.0F);

 

And thats in in the method:

@Override
    public void renderItem(ItemRenderType type, ItemStack item, Object... data)
    {
        TileEntityRenderer.instance.renderTileEntityAt(new TileEntityTrafficLight(), 0.0D, 0.0D, 0.0D, 0.0F);
    }

 

If anyone knows a solution, I would very appriciate that!

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

E, yes!

TileEntityRenderer.instance.renderTileEntityAt(new TileEntityTrafficLight(), 0.0D, 0.0D, 0.0D, 0.0F);

this is doing me error too!

Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM]

If you want to use my API please give me a Karma/Thank you

Sorry for some bad words ´cause I am not a walkin´ library!

Posted
  On 6/29/2013 at 6:47 PM, mar21 said:

E, yes!

TileEntityRenderer.instance.renderTileEntityAt(new TileEntityTrafficLight(), 0.0D, 0.0D, 0.0D, 0.0F);

this is doing me error too!

 

So if anyone knows a solution to that, I (we) would appriciate that.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
  On 6/30/2013 at 6:18 AM, larsgerrits said:

  Quote

E, yes!

TileEntityRenderer.instance.renderTileEntityAt(new TileEntityTrafficLight(), 0.0D, 0.0D, 0.0D, 0.0F);

this is doing me error too!

 

So if anyone knows a solution to that, I (we) would appriciate that.

 

It's kinda weird, that isn't the bugged line.

I changed this line of code:

int meta = te.getBlockMetadata();
int rotation = 0;
        if(meta == 2){rotation = 180;}//SOUTH
        if(meta == 3){rotation = 0;}//NORTH
        if(meta == 4){rotation = -90;}//EAST
        if(meta == 5){rotation = 90;}//WEST

to:

int meta = 0;
        if(te.worldObj != null)
        {
        	meta = te.worldObj.getBlockMetadata((int)x,(int)y,(int)z);
        }
        int rotation = 0;
        if(meta == 2){rotation = 180;}//SOUTH
        if(meta == 3){rotation = 0;}//NORTH
        if(meta == 4){rotation = -90;}//EAST
        if(meta == 5){rotation = 90;}//WEST

 

Now it doesn't crash anymore, but when I add:

System.out.println(meta);

and it seems like meta is always 0...

If anyone knows why that is

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

I dont, know, I am using this code for my custom model of my custom furnace, so I using the basic furnace metadata with side, where you placed, based on player looking.

It work for me pretty well. You need the rotating thing in the YourBlock class...

Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM]

If you want to use my API please give me a Karma/Thank you

Sorry for some bad words ´cause I am not a walkin´ library!

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.