Jump to content

[1.8] Binding Texture With Texture Manager


EverythingGames

Recommended Posts

#1 If you can get the player skin as a TextureAtlasSprite, then you can add it using TGG's createBakedQuadForFace method from the chess board tutorial.

 

#2 That's the entire point of IPerspectiveAwareModel. Look at the examples in the two posts I mentioned earlier - they both return different models based on perspective.

Link to comment
Share on other sites

I have most of it done. I appreciate your help @coolAlias. I have a class implementing IPerspectiveAwareModel and have registered it on the ModelBakeEvent. I'm pretty sure I still have to register the render for the item anyway? The tricky part for my item is that I want to de-render cuboids based on first person / third person etc. If you could just help me out on the the handlePerspective() method I think we can conclude this topic! By the way, why is almost everything deprecated?

public class ModelItem implements IPerspectiveAwareModel
{

private IBakedModel modelItem;

@Override
public List getFaceQuads(EnumFacing par1EnumFacing) 
{
	return this.modelItem.getFaceQuads(par1EnumFacing);
}

@Override
public List getGeneralQuads() 
{
	return this.modelItem.getGeneralQuads();
}

@Override
public boolean isAmbientOcclusion() 
{
	return this.modelItem.isAmbientOcclusion();
}

@Override
public boolean isGui3d() 
{
	return this.modelItem.isGui3d();
}

@Override
public boolean isBuiltInRenderer() 
{
	return this.modelItem.isBuiltInRenderer();
}

@Override
public TextureAtlasSprite getTexture() 
{
	return this.modelItem.getTexture();
}

@Override
public ItemCameraTransforms getItemCameraTransforms() 
{
	return this.modelItem.getItemCameraTransforms();
}

@Override
public Pair<IBakedModel, Matrix4f> handlePerspective(TransformType par1TransformType) 
{
	switch(par1TransformType)
	{
	case FIRST_PERSON: //What should I do here
		break;
	case THIRD_PERSON: //What should I do here
		break;
	case GUI: //What should I do here
		break;
	default:
		break;
	}
	return null; //What should I return here
}

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

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.