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

When rendering my tile entity, the model renders incorrectly. The model renders in the right block on the first place, but every time I place it after that, the model keeps rendering in the first position. The model itself doesn't render properly either.

 

WoodenBaseTileEntityRenderer.java:

package com.aimod.tileEntities;

import org.lwjgl.opengl.GL11;
import com.aimod.Main;
import com.aimod.models.WoodenBaseModel;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

public class WoodenBaseTileEntityRenderer extends TileEntitySpecialRenderer {

private WoodenBaseModel model;
private ResourceLocation texture = new ResourceLocation("aimod:textures/blocks/WoodenBase.png");

public WoodenBaseTileEntityRenderer() {
	model = new WoodenBaseModel();
}

@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float scale) {
	GL11.glPushMatrix();
	GL11.glTranslated(x+0.5, y+1.5, z+0.5);
	GL11.glRotated(0, 0, 0, 1);
	this.bindTexture(texture);
	this.model.render(null, 0, -0.1f, 0, 0, 0, -0.0625f);
	GL11.glPopMatrix();
}
}

  • Author

I probably should have said this in my first post, but the block will need to have a GUI and storage. I'm using 1.7.10, which I also should have said. I'm absent-minded. Since it needs storage, wouldn't it need to be a tile entity?

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.