Jump to content

[1.7.10]Weird crash report And TE's not rendering properly [solved]


Recommended Posts

Posted

it happens randomly idk what causes it

 

java.lang.NullPointerException: Rendering Block Entity
at ships.addon.blocks_items.RenderMast.func_147500_a(RenderMast.java:29)
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_147549_a(SourceFile:100)
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_147544_a(SourceFile:92)
at net.minecraft.client.renderer.RenderGlobal.func_147589_a(RenderGlobal.java:483)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1224)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1015)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:989)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

Also it wont let me launch debug it just highlights this line of code

 

uMp6gJs.png

 

The  tileentities stop rendering when they think i cant see them?

95lwDwi.png

 

 

Here is my bitbucket:

https://bitbucket.org/AlphaFox/shipsaddon/src

 

and here is the compiled version download:

http://www.mediafire.com/download/h2quv5hqxfuq2ah/Sails.zip

 

And lastly here is the forum thread on MC forums if u want it:

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2384775-sails-masts-addon-for-ships-mod-90-complete

Posted

Please Post the relevant code(TileEntity and TileEntitySpecialRenderer) here, the Bitbucket does not allow to see the code without login. (or is it private? Then we cannot help you)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Seems like your "RenderMast" class has a function in it that is returning null. May we see that?

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Posted

sorry i am new to bitbucket and modding in general. It is now public

this is the TileEntitySpecialRenderer

package ships.addon.blocks_items;

import net.minecraft.block.Block;
import net.minecraft.block.BlockAnvil;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.world.IBlockAccess;
import ships.addon.blocks_items.BlockSail;

import org.lwjgl.opengl.GL11;

import ships.addon.lib.Ref;
import ships.addon.models.AcendingSailModel;
import ships.addon.models.MastModel;
import ships.addon.models.SailModel;

public class RenderSail extends TileEntitySpecialRenderer{

private static final ResourceLocation textureSail = new ResourceLocation(Ref.MODID+":"+"textures/blocks/sail.png");
private SailModel modelSail;
private AcendingSailModel acendingSail;

public RenderSail(){
	this.modelSail = new SailModel();
	this.acendingSail = new AcendingSailModel();
	}

@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f){
GL11.glPushMatrix();
	GL11.glTranslatef((float)x+0.5F,(float)y-0.5F,(float)z+0.5F);
	this.bindTexture(textureSail);
	byte Direction = ((TEsail)tileentity.getWorldObj().getTileEntity(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord)).getValue();
	int dir = 0;
	dir = Direction;
	if(Direction>1&&Direction<=5){dir = Direction-2;}
	else if(Direction>5){dir = Direction-6;}
	GL11.glRotatef((float)dir*90, 0.0F, 1.0F, 0.0F);
	if(Direction>5){GL11.glTranslatef(0.5F,0.0F,0.0F);}
	if(Direction<=1){this.modelSail.renderModel(0.0625F);}
	else if(Direction>1){this.acendingSail.renderModel(0.0625F);}
GL11.glPopMatrix();
}
}

package ships.addon.blocks_items;

import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;

public class TEsail extends TileEntity {
private byte Direction;

//---- Setters and Getters ----\\
public byte getValue() {
    return Direction;
}
public void setValue(byte value) {
    Direction = value;
}

//---- Read and Write ----\\
    public void writeToNBT(NBTTagCompound nbt)
    {
    	nbt.setByte("Direction", this.Direction);
        super.writeToNBT(nbt);
        markForUpdate();
    }
    public void readFromNBT(NBTTagCompound nbt)
    {
    	this.Direction = nbt.getByte("Direction");
        super.readFromNBT(nbt);
    }
    
    //---- Packets ----\\
    @Override
    public Packet getDescriptionPacket(){
    	NBTTagCompound tileTag = new NBTTagCompound();
    	this.writeToNBT(tileTag);
    	return new S35PacketUpdateTileEntity(this.xCoord,this.yCoord,this.zCoord,0,tileTag);   	
    }
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
{
	this.readFromNBT(pkt.func_148857_g());
}

//---- Mark for Update ----\\
public void markForUpdate() {
    this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
  • Topics

×
×
  • Create New...

Important Information

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