Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I currently have this model:

// Date: 2/12/2014 10:01:52 PM
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package tlhpoe.fs.entity.model;

import net.minecraft.client.model.ModelBoat;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class ModelMKM7 extends ModelBoat {
//fields
ModelRenderer leg1;
ModelRenderer leg2;
ModelRenderer body1;
ModelRenderer body2;
ModelRenderer head;
ModelRenderer cannon;

public ModelMKM7() {
	textureWidth = 64;
	textureHeight = 32;
	leg1 = new ModelRenderer(this, 0, 0);
	leg1.addBox(0F, 0F, 0F, 2, 3, ;
	leg1.setRotationPoint(5F, 21F, 4F);
	leg1.setTextureSize(64, 32);
	leg1.mirror = true;
	setRotation(leg1, 0F, 3.141593F, 0F);
	leg2 = new ModelRenderer(this, 0, 0);
	leg2.addBox(0F, 0F, 0F, 2, 3, ;
	leg2.setRotationPoint(-5F, 21F, -4F);
	leg2.setTextureSize(64, 32);
	leg2.mirror = true;
	setRotation(leg2, 0F, 0F, 0F);
	body1 = new ModelRenderer(this, 20, 0);
	body1.addBox(0F, 0F, 0F, 6, 2, 6);
	body1.setRotationPoint(-3F, 21.3F, -3F);
	body1.setTextureSize(64, 32);
	body1.mirror = true;
	setRotation(body1, 0F, 0F, 0F);
	body2 = new ModelRenderer(this, 0, 11);
	body2.addBox(0F, 0F, 0F, 4, 5, 4);
	body2.setRotationPoint(-2F, 16.3F, -2F);
	body2.setTextureSize(64, 32);
	body2.mirror = true;
	setRotation(body2, 0F, 0F, 0F);
	head = new ModelRenderer(this, 44, 23);
	head.addBox(0F, 0F, 0F, 5, 4, 5);
	head.setRotationPoint(-2.5F, 12.3F, -2.5F);
	head.setTextureSize(64, 32);
	head.mirror = true;
	setRotation(head, 0F, 0F, 0F);
	cannon = new ModelRenderer(this, 0, 20);
	cannon.addBox(0F, 0F, 0F, 2, 2, 1);
	cannon.setRotationPoint(-1F, 13.3F, -3F);
	cannon.setTextureSize(64, 32);
	cannon.mirror = true;
	setRotation(cannon, 0F, 0F, 0F);
}

public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
	super.render(entity, f, f1, f2, f3, f4, f5);
	setRotationAngles(f, f1, f2, f3, f4, f5, entity);
	leg1.render(f5);
	leg2.render(f5);
	body1.render(f5);
	body2.render(f5);
	head.render(f5);
	cannon.render(f5);
}

private void setRotation(ModelRenderer model, float x, float y, float z) {
	model.rotateAngleX = x;
	model.rotateAngleY = y;
	model.rotateAngleZ = z;
}

public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) {
	super.setRotationAngles(f, f1, f2, f3, f4, f5, e);
}
}

 

That takes a texture with a size of 64 by 32. The problem is, I have a texture with a size of 128 by 64.

 

If I try using the texture, this happens:

x446.png

 

Am I doing something wrong?

Kain

  • Author

This happens:

Wt6qwU1.png

 

 

If I tried changing the

.setTextureSize(64, 32);

 

to

.setTextureSize(128, 64);

 

This happens:

a5tcBJ9.png

 

 

Additionally, if I double the texture locations:

new ModelRenderer(this, 20, 0);

 

To this:

new ModelRenderer(this, 40, 0);

 

This happens:

QHDuZsL.png

Kain

The way i did it, was go in Techne and made my model twice as large, made a texture twice as large and then in your renderer use GL11.glScalef(0.5f,0.5f,0.5f). This is a very time-consuming way because you need to remake your model, make your textures twice as large and export it again etc.

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/

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.