Jump to content

NBT's are not saving or saving too soon when the game is quit


kris91268

Recommended Posts

Hello there,

 

I have implemented a gui to a block that sets it's height for which launches you in the air on contact with the block. When I run the game, I can set different height levels for different blocks, but when I save and quit then reload, they are not saved and are reset to the default value

 

Is there any way for me to save the nbt data when the gui is closed, or when the game is quit? Because I checked, and the tile entities are reading and writing too early.

 

Examples

 

BlockGravityLift.java

package kris91268.lbd.Blocks;

import java.util.Random;
import kris91268.lbd.GuiGravityLift;
import kris91268.lbd.ModLBD;
import kris91268.lbd.Tileentity.TileEntityGravityLift;
import cpw.mods.fml.common.registry.BlockProxy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;

/**
* 
* @author Arbiter
*
*/
public class BlockGravityLift extends BlockContainer implements BlockProxy
{
public Class theTileEntityClass;
public BlockGravityLift(int par1, Class entityClass)
{
	super(par1, Material.iron);
	this.theTileEntityClass = entityClass;
	setHardness(1.5F);
	setResistance(1.0F);
	setStepSound(Block.soundMetalFootstep);
	setUnlocalizedName("lbd:gravityLift");
	func_111022_d("lbd:gravityLift");
	setCreativeTab(CreativeTabs.tabRedstone);
	setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3F, 1.0F);
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
	TileEntityGravityLift tileEntity = (TileEntityGravityLift)par1World.getBlockTileEntity(par2, par3, par4);
	if (tileEntity.height <= 0.0D)
	{
		return;
	}
	if (par1World.isRemote)
	{
		if (par5Entity instanceof EntityPlayer)
		{
			par5Entity.setVelocity(0.0D, tileEntity.height / 2, 0.0D);
			par5Entity.moveEntity(0.0D, tileEntity.height, 0.0D);
		}
	}
	else
	{
		if (par5Entity instanceof EntityPlayerMP)
		{
			par5Entity.addVelocity(0.0D, tileEntity.height / 2, 0.0D);
			par5Entity.moveEntity(0.0D, tileEntity.height, 0.0D);
		}
	}
}
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer player, int metadata, float par7, float par8, float par9)
{
    if (!par1World.isRemote)
    {
    	TileEntityGravityLift tileEntity = (TileEntityGravityLift)par1World.getBlockTileEntity(par2, par3, par4);
    	if (tileEntity != null)
    	{
    		player.openGui(ModLBD.instance, 0, par1World, par2, par3, par4);
    	}
    }
    return true;
}
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
	double d0 = (double)((float)par2 + 0.5F);
	double d1 = (double)((float)par3 + 0.3F);
	double d2 = (double)((float)par4 + 0.5F);
	par1World.spawnParticle("smoke", d0, d1, d2, 0.0D, 0.0D, 0.0D);
}
public boolean isOpaqueCube()
{
	return false;
}
public boolean renderAsNormalBlock()
{
	return false;
}
public int getRenderType()
{
	return -1;
}
public TileEntity getBlockEntity()
{
	return new TileEntityGravityLift();
}
public TileEntity createNewTileEntity(World par1World)
{
	try
	{
		return (TileEntity)theTileEntityClass.newInstance();
	}
	catch (Exception e)
	{
		throw new RuntimeException();
	}
}
}

 

TileEntityGravityLift.java

package kris91268.lbd.Tileentity;

import java.awt.List;

import kris91268.lbd.Blocks.BlockGravityLift;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

/**
* 
* @author Arbiter
*
*/
public class TileEntityGravityLift extends TileEntity
{
private String aString;
public Double height = new Double(0.0D);			

public void readFromNBT(NBTTagCompound par1NBTTagCompound)
{
	super.readFromNBT(par1NBTTagCompound);
	this.height = par1NBTTagCompound.getDouble("height");
	System.out.println(height);
}
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
{
	super.writeToNBT(par1NBTTagCompound);
	par1NBTTagCompound.setDouble("height", height);
	System.out.println(height);
}
public boolean isUsableByPlayer(EntityPlayer par1EntityPlayer)
{
	return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : 
		par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
}
public void something(String par1Str)
{
	this.aString = par1Str;
}
}

 

GuiGravityLift.java

package kris91268.lbd;

import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;

import kris91268.lbd.Blocks.BlockGravityLift;
import kris91268.lbd.Tileentity.TileEntityGravityLift;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

/**
* 
* @author Arbiter
*
*/
public class GuiGravityLift extends GuiContainer
{
private static final ResourceLocation texture = new ResourceLocation("lbd:textures/gui/gravlift.png");
private GuiButton dnButton;
private GuiButton decByPointZeroOne;
private GuiButton decByPointOne;
private GuiButton incByPointOne;
private GuiButton incByOnePointZero;
private GuiTextField number;
public static String gravLiftHeight;
private TileEntityGravityLift tileEntity;

public GuiGravityLift(InventoryPlayer par1, TileEntityGravityLift par2)
{
	super(new ContainerGravityLift(par1, par2));
	tileEntity = par2;
	gravLiftHeight = tileEntity.height.toString();
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
	fontRenderer.drawString("Gravity Lift", 8, 6, 4210752);
	fontRenderer.drawString("Inventory", 8, ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
	this.mc.func_110434_K().func_110577_a(texture);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	int x = (width - xSize) / 2;
	int y = (height - ySize) / 2;
	this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
	this.number.drawTextBox();
}
@Override
public void initGui()
{
	super.initGui();
	this.buttonList.clear();
	Keyboard.enableRepeatEvents(true);
	this.buttonList.add(this.dnButton = new GuiButton(0, this.width / 2 - 25, this.height / 4 + 35, 50, 20, "Done"));
	this.buttonList.add(this.decByPointZeroOne = new GuiButton(1, this.width / 2 - 75, this.height / 4 + 0, 40, 20, "-0.1"));
	this.buttonList.add(this.decByPointOne = new GuiButton(2, this.width / 2 - 75, this.height / 4 + 25, 40, 20, "-1.0"));
	this.buttonList.add(this.incByPointOne = new GuiButton(3, this.width / 2 + 25, this.height / 4 + 0, 40, 20, "+0.1"));
	this.buttonList.add(this.incByOnePointZero = new GuiButton(4, this.width / 2 + 25, this.height / 2 + 25, 40, 20, "+1.0"));
	this.number = new GuiTextField(this.fontRenderer, this.width / 2 - 20, this.height / 4 + 1, 40, 20);
	this.number.setVisible(true);
	this.number.setCanLoseFocus(false);
	this.number.setFocused(true);
	this.number.setText(tileEntity.height.toString());

}
public void onGuiClosed()
{
	Keyboard.enableRepeatEvents(false);
	Double theNumber = Double.parseDouble(gravLiftHeight);
	tileEntity.height = theNumber;
}
public boolean isAboveZero(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble >= 0.00D ? true : false;
}
public boolean isBelowFive(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble <= 5.0D ? true : false;
}
public void updateScreen()
{
	this.number.updateCursorCounter();
}
@Override
protected void actionPerformed(GuiButton guiButton)
{
	switch (guiButton.id)
	{
	case 0:
		this.mc.displayGuiScreen((GuiScreen)null);
		break;
	case 1:
		if (isAboveZero(gravLiftHeight))
		{
			Double heightInDoubles = Double.parseDouble(gravLiftHeight);
			heightInDoubles -= 0.1D;
			gravLiftHeight = heightInDoubles.toString();
			number.setText(gravLiftHeight);
			tileEntity.height = heightInDoubles;
		}
		break;
	case 2:
		if (isAboveZero(gravLiftHeight))
		{
			Double heightInDoubles1 = Double.parseDouble(gravLiftHeight);
			if (heightInDoubles1 < 1.0D)
			{
				heightInDoubles1 = 0.0D;
			}
			else
			{
				heightInDoubles1 -= 1.0D;
			}
			gravLiftHeight = heightInDoubles1.toString();
			number.setText(gravLiftHeight);
			tileEntity.height = heightInDoubles1;
		}
		break;
	case 3:
		if (isBelowFive(gravLiftHeight))
		{
			Double theHeight = Double.parseDouble(gravLiftHeight);
			theHeight += 0.1D;
			gravLiftHeight = theHeight.toString();
			number.setText(gravLiftHeight);
			tileEntity.height = theHeight;
		}
		break;
	case 4:
		if (isBelowFive(gravLiftHeight))
		{
			Double theNumber = Double.parseDouble(gravLiftHeight);
			if (theNumber > 4.0D)
			{
				theNumber = 5.0D;
			}
			else
			{
				theNumber += 1.0D;
			}
			gravLiftHeight = theNumber.toString();
			number.setText(gravLiftHeight);
			tileEntity.height = theNumber;
		}
		default:
			break;
	}
}
}

 

Any help would be much appreciated

Link to comment
Share on other sites

Sorry if I'm no help (I'm still learning), but possible suggestions to try:

 

Perhaps adding @Override just above your initialization of the tile entity within the block class:

@Override
public TileEntity createNewTileEntity(World par1World)

 

Or maybe setting the data to be saved from within the tile entity class:

public void somethingelse(Double newheight)
{
     this.height = newheight;
}

And then calling that method in your GUI class in the onGuiClosed():

public void onGuiClosed()
{
	Keyboard.enableRepeatEvents(false);
	Double theNumber = Double.parseDouble(gravLiftHeight);
	tileEntity.somethingelse(theNumber);
}

 

If I had my dev environment handy, I would test for you before replying to ensure it works, but I'm at work.

All the tutorials on NBT I have read suggest that the Tile Entity itself has to save the data.  Perhaps just passing the data to it does not call the writeToNBT method?

Link to comment
Share on other sites

I believe the problem you are having is that you aren't telling the server what is changing in the nbt data, you're doing everything client side, which, upon log out, is discarded. What you will want to do is send a packet to the server, then have it execute the changes as a result of what packet it receives.

Link to comment
Share on other sites

Read through these two tutorials:

http://www.minecraftforge.net/wiki/Packet_Handling

http://www.minecraftforge.net/wiki/Advanced_Packet_Handling

(I suggest you do not change any part of your code until after you've read through these, and understand packet handling)

 

Once you get a grip on packet handling, it might become clearer. Basically, where ever you want to change a value in the tile entity of a block, you want to send a packet to the server that tells the server to change the value of the block. That way, you make sure the server knows you're making a change, not just the client. After you've read through both tutorials, if you still are unclear on what you should do, I can try to walk you through getting it to change.

Link to comment
Share on other sites

Read through these two tutorials:

http://www.minecraftforge.net/wiki/Packet_Handling

http://www.minecraftforge.net/wiki/Advanced_Packet_Handling

(I suggest you do not change any part of your code until after you've read through these, and understand packet handling)

 

Once you get a grip on packet handling, it might become clearer. Basically, where ever you want to change a value in the tile entity of a block, you want to send a packet to the server that tells the server to change the value of the block. That way, you make sure the server knows you're making a change, not just the client. After you've read through both tutorials, if you still are unclear on what you should do, I can try to walk you through getting it to change.

 

I'm sorry, but I have already looked through those tutorials, and I still don't know what to do, or where I should implement everything. It should be much simpler than this shouldn't it? Thank you already for the help you have given me, it is much appreciated. I will mention you in the mod's credits.

Link to comment
Share on other sites

Read through these two tutorials:

http://www.minecraftforge.net/wiki/Packet_Handling

http://www.minecraftforge.net/wiki/Advanced_Packet_Handling

(I suggest you do not change any part of your code until after you've read through these, and understand packet handling)

 

Once you get a grip on packet handling, it might become clearer. Basically, where ever you want to change a value in the tile entity of a block, you want to send a packet to the server that tells the server to change the value of the block. That way, you make sure the server knows you're making a change, not just the client. After you've read through both tutorials, if you still are unclear on what you should do, I can try to walk you through getting it to change.

 

I'm sorry, but I have already looked through those tutorials, and I still don't know what to do, or where I should implement everything. It should be much simpler than this shouldn't it? Thank you already for the help you have given me, it is much appreciated. I will mention you in the mod's credits.

 

No need to put me in the mod's credits! Packet handling is a bit confusing at first, but once you actually get one working it's simple. I can try to figure out what needs to be done, but it is quite late where I am, so I will take a look at your code tomorrow, sound good?

Link to comment
Share on other sites

Read through these two tutorials:

http://www.minecraftforge.net/wiki/Packet_Handling

http://www.minecraftforge.net/wiki/Advanced_Packet_Handling

(I suggest you do not change any part of your code until after you've read through these, and understand packet handling)

 

Once you get a grip on packet handling, it might become clearer. Basically, where ever you want to change a value in the tile entity of a block, you want to send a packet to the server that tells the server to change the value of the block. That way, you make sure the server knows you're making a change, not just the client. After you've read through both tutorials, if you still are unclear on what you should do, I can try to walk you through getting it to change.

 

I'm sorry, but I have already looked through those tutorials, and I still don't know what to do, or where I should implement everything. It should be much simpler than this shouldn't it? Thank you already for the help you have given me, it is much appreciated. I will mention you in the mod's credits.

 

No need to put me in the mod's credits! Packet handling is a bit confusing at first, but once you actually get one working it's simple. I can try to figure out what needs to be done, but it is quite late where I am, so I will take a look at your code tomorrow, sound good?

 

OK, thank you so much

 

Just a heads up with my code, some of it might be pointless or unccessesary, just ignore them, unless they are of utmost importance

Link to comment
Share on other sites

Okay, so first thing you want to do is get the packet framework in place before you change any of your existing code. Create a new class, this will be our base for any packets we send, call it something like PacketBase. In this class you will want to follow the Making the Base for our Packet classes part in the Advanced Packet Handling tutorial I linked to earlier.

 

This class basically implements all the basic stuff needed to create a packet, and it will be the parent class to any custom packets we send. This is also where we will register any custom packets we made. Do this, and post a reply when you are done with this step. If you run into any problem, post here and I will help you figure them out.

Link to comment
Share on other sites

OK, the PacketBase class is all figured out, what next?

 

Here is the code for the PacketBase

 

PacketBase.java

package kris91268.lbd;

import net.minecraft.entity.player.EntityPlayer;

import com.google.common.collect.BiMap;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;

import cpw.mods.fml.relauncher.Side;

/**
* 
* @author Arbiter
*
*/
public abstract class PacketBase
{
public static final String CHANNEL = "lbd";
private static final BiMap<Integer, Class<? extends PacketBase>> idMap;

static
{
	ImmutableBiMap.Builder<Integer, Class<? extends PacketBase>> builder = ImmutableBiMap.builder();
	idMap = builder.build();
}	
public static PacketBase constructPacket(int packetId) throws ProtocolException, ReflectiveOperationException
{
	Class<? extends PacketBase> theClass = idMap.get(Integer.valueOf(packetId));
	if (theClass == null)
	{
		throw new ProtocolException("Unknown packet id");
	}
	else
	{
		return theClass.newInstance();
	}
}	
public static class ProtocolException extends Exception
{
	public ProtocolException()
	{

	}
	public ProtocolException(String message, Throwable cause)
	{
		super(message, cause);
	}
	public ProtocolException(String message)
	{
		super(message);
	}
	public ProtocolException(Throwable cause)
	{
		super(cause);
	}
}
public abstract void write(ByteArrayDataOutput out);

public abstract void read(ByteArrayDataInput in);

public abstract void execute(EntityPlayer par1EntityPlayer, Side par2Side);
}

Link to comment
Share on other sites

Okay, next we need a way to receive packets, this is our packet handler, create a new class call CustomPacketHandler and follow the receiving packets section of the tutorial. You will need to change some class names in the code (namely from DemoPacket to PacketBase).

 

This class basically determines when a packet is sent, and determines what it should do with it.

Link to comment
Share on other sites

Here is the PacketHandler class, what is next?

 

PacketHandler.java

package kris91268.lbd;

import java.util.logging.Logger;

import kris91268.lbd.PacketBase.ProtocolException;

import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;

/**
* 
* @author Arbiter
*
*/
public class PacketHandler implements IPacketHandler
{
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
{
	try
	{
		EntityPlayer entityPlayer = (EntityPlayer)player;
		ByteArrayDataInput in = ByteStreams.newDataInput(packet.data);
		int packetId = in.readUnsignedByte();
		PacketBase packetBase = PacketBase.constructPacket(packetId);
		packetBase.read(in);
		packetBase.execute(entityPlayer, entityPlayer.worldObj.isRemote ? Side.CLIENT : Side.SERVER);
	}
	catch (ProtocolException e)
	{
		if (player instanceof EntityPlayerMP)
		{
			((EntityPlayerMP)player).playerNetServerHandler.kickPlayerFromServer("Protocol Exception!");
			Logger.getLogger("lbd").warning("Player " + ((EntityPlayer)player).username + " caused a Protocol Exception");
		}
	}
	catch (ReflectiveOperationException e)
	{
		throw new RuntimeException("Unexpected Reflection exception during Packet construction");
	}
}
}

Link to comment
Share on other sites

Next is the method that actually sends our packet.  Add the following to your BasePacket class:

        public final int getPacketId() {
                if (idMap.inverse().containsKey(getClass())) {
                        return idMap.inverse().get(getClass()).intValue();
                } else {
                        throw new RuntimeException("Packet " + getClass().getSimpleName() + " is missing a mapping!");
                }
        }
       
        public final Packet makePacket() {
                ByteArrayDataOutput out = ByteStreams.newDataOutput();
                out.writeByte(getPacketId());
                write(out);
                return PacketDispatcher.getPacket(CHANNEL, out.toByteArray());
        }

 

These methods make it so that you can actually send a packet to the server.

Link to comment
Share on other sites

Okay, now it is time to make your custom packet. Make a new class named something like, BlockChangePacket, so you know what the packet is doing later without having to look at the actual class. Follow the making our first class part of the tutorial. Under the execute method is where you will want to tell it to change the block. My suggestion is after you finish that part, create a constructor for that class that takes in an integer array, which you would use to send the x, y, and z coordinates of the specific block you want to change the values of, and set three variables (name them what you would like, but x, y and z would be the least confusing) to the values accordingly.

 

Under execute if where will out your code for changing the block's variables. This is where it gets a little involved, so do what you can, and then post here if you get stuck.

Link to comment
Share on other sites

Hmm, well I tried to look through your code but I was a bit confused, in your current code where do you change the height of how high the block lifts you?

 

The way I would do it is have an NBT tag called height, which stored and integer. Then for the packet I'd send an integer array that help 4 numbers, the X, Y, and Z coordinates of the block, and the height I want it to change to. Under the execute I would retrieve the tile entity at the X, Y, and Z coordinates, and then set the NBT tag height to the fourth number I sent. Then I would have the block read the NBT tag to get what height it should be lifting to.

Link to comment
Share on other sites

Well, either way would work I believe, but basically take your actionPerformed method, and replicate it under the execute command in you custom packet. You will need to first retrieve the tile entity from the correct block, since it's not passed in the packet. After you've done that, post your custom packet code.

Link to comment
Share on other sites

I have made all of the files, and tested it out. When I try it out, the game crashes with a null pointer exception. I know it is doing this because there is no tile entity defined, but can't figure out where it is being initialized to null. Here are all of the files that have been updated, focus on the part in the gui where it creates a new packet, and the packet files

 

PacketHandler.java

package kris91268.lbd.Packet;

import java.util.logging.Logger;

import kris91268.lbd.Packet.PacketBase.ProtocolException;

import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;

/**
* 
* @author Arbiter
*
*/
public class PacketHandler implements IPacketHandler
{
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
{
	try
	{
		EntityPlayer entityPlayer = (EntityPlayer)player;
		ByteArrayDataInput in = ByteStreams.newDataInput(packet.data);
		int packetId = in.readUnsignedByte();
		PacketBase packetBase = PacketBase.constructPacket(packetId);
		packetBase.read(in);
		packetBase.execute(entityPlayer, entityPlayer.worldObj.isRemote ? Side.CLIENT : Side.SERVER);
	}
	catch (ProtocolException e)
	{
		if (player instanceof EntityPlayerMP)
		{
			((EntityPlayerMP)player).playerNetServerHandler.kickPlayerFromServer("Protocol Exception!");
			e.printStackTrace();
			Logger.getLogger("lbd").warning("Player " + ((EntityPlayer)player).username + " caused a Protocol Exception");
		}
	}
	catch (ReflectiveOperationException e)
	{
		throw new RuntimeException("Unexpected Reflection exception during Packet construction");
	}
}
}

 

PacketBase.java

package kris91268.lbd.Packet;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.packet.Packet;

import com.google.common.collect.BiMap;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;

import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.relauncher.Side;

/**
* 
* @author Arbiter
*
*/
public abstract class PacketBase
{
public static final String CHANNEL = "lbd";
private static final BiMap<Integer, Class<? extends PacketBase>> idMap;

static
{
	ImmutableBiMap.Builder<Integer, Class<? extends PacketBase>> builder = ImmutableBiMap.builder();
	builder.put(Integer.valueOf(0), PacketBlockChange.class);
	idMap = builder.build();
}	
public static PacketBase constructPacket(int packetId) throws ProtocolException, ReflectiveOperationException
{
	Class<? extends PacketBase> theClass = idMap.get(Integer.valueOf(packetId));
	if (theClass == null)
	{
		throw new ProtocolException("Unknown packet id");
	}
	else
	{
		return theClass.newInstance();
	}
}	
public static class ProtocolException extends Exception
{
	public ProtocolException()
	{

	}
	public ProtocolException(String message, Throwable cause)
	{
		super(message, cause);
	}
	public ProtocolException(String message)
	{
		super(message);
	}
	public ProtocolException(Throwable cause)
	{
		super(cause);
	}
}
public final int getPacketId()
{
	if (idMap.inverse().containsKey(getClass()))
	{
		return idMap.inverse().get(getClass()).intValue();
	}
	else
	{
		throw new RuntimeException("Packet " + getClass().getSimpleName() + " is missing a mapping");
	}
}
public final Packet makePacket()
{
	ByteArrayDataOutput out = ByteStreams.newDataOutput();
	out.writeByte(getPacketId());
	write(out);
	return PacketDispatcher.getPacket(CHANNEL, out.toByteArray());
}
public abstract void write(ByteArrayDataOutput out);

public abstract void read(ByteArrayDataInput in) throws ProtocolException;

public abstract void execute(EntityPlayer par1EntityPlayer, Side par2Side) throws ProtocolException;
}

 

PacketBlockChange.java

package kris91268.lbd.Packet;

import kris91268.lbd.Tileentity.TileEntityGravityLift;
import net.minecraft.entity.player.EntityPlayer;

import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;

import cpw.mods.fml.relauncher.Side;

/**
* 
* @author Arbiter
*
*/
public class PacketBlockChange extends PacketBase
{
private double height;
private TileEntityGravityLift tileEntity;

public PacketBlockChange(double height, TileEntityGravityLift par2, int x, int y, int z)
{
	this.height = height;
	tileEntity = (TileEntityGravityLift)par2.worldObj.getBlockTileEntity(x, y, z);
}
public PacketBlockChange()
{

}
@Override
public void write(ByteArrayDataOutput out)
{
	out.writeDouble(height);
}
@Override
public void read(ByteArrayDataInput in) throws ProtocolException
{
	height = in.readDouble();
}
@Override
public void execute(EntityPlayer player, Side side) throws ProtocolException
{
	if (side.isClient())
	{
		System.out.println(tileEntity.height);
		System.out.println(this.height);
		tileEntity.height = this.height;
	}
	else
	{
		throw new ProtocolException("Cannot send packet to server");
	}
}
}

 

GuiGravityLift.java

package kris91268.lbd;

import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;

import cpw.mods.fml.common.network.PacketDispatcher;

import kris91268.lbd.Blocks.BlockGravityLift;
import kris91268.lbd.Packet.PacketBlockChange;
import kris91268.lbd.Tileentity.TileEntityGravityLift;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

/**
* 
* @author Arbiter
*
*/
public class GuiGravityLift extends GuiContainer
{
private static final ResourceLocation texture = new ResourceLocation("lbd:textures/gui/gravlift.png");
private GuiButton dnButton;
private GuiButton decByPointZeroOne;
private GuiButton decByPointOne;
private GuiButton incByPointOne;
private GuiButton incByOnePointZero;
private GuiTextField number;
public static String gravLiftHeight;
private TileEntityGravityLift tileEntity;

public GuiGravityLift(InventoryPlayer par1, TileEntityGravityLift par2)
{
	super(new ContainerGravityLift(par1, par2));
	tileEntity = par2;
	gravLiftHeight = par2.height.toString();
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
	fontRenderer.drawString("Gravity Lift", 8, 6, 4210752);
	fontRenderer.drawString("Inventory", 8, ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
	this.mc.func_110434_K().func_110577_a(texture);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	int x = (width - xSize) / 2;
	int y = (height - ySize) / 2;
	this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
	this.number.drawTextBox();
}
@Override
public void initGui()
{
	super.initGui();
	this.buttonList.clear();
	Keyboard.enableRepeatEvents(true);
	this.buttonList.add(this.dnButton = new GuiButton(0, this.width / 2 - 25, this.height / 4 + 35, 50, 20, "Done"));
	this.buttonList.add(this.decByPointZeroOne = new GuiButton(1, this.width / 2 - 75, this.height / 4 + 0, 40, 20, "-0.1"));
	this.buttonList.add(this.decByPointOne = new GuiButton(2, this.width / 2 - 75, this.height / 4 + 25, 40, 20, "-1.0"));
	this.buttonList.add(this.incByPointOne = new GuiButton(3, this.width / 2 + 25, this.height / 4 + 0, 40, 20, "+0.1"));
	this.buttonList.add(this.incByOnePointZero = new GuiButton(4, this.width / 2 + 25, this.height / 4 + 25, 40, 20, "+1.0"));
	this.number = new GuiTextField(this.fontRenderer, this.width / 2 - 20, this.height / 4 + 1, 40, 20);
	this.number.setVisible(true);
	this.number.setCanLoseFocus(false);
	this.number.setFocused(true);
	this.number.setText(tileEntity.height.toString());

}
public void onGuiClosed()
{
	Keyboard.enableRepeatEvents(false);
	Double theNumber = Double.parseDouble(gravLiftHeight);
	tileEntity.height = theNumber;
	tileEntity.bindHeightToTileEntity(theNumber);
}
public boolean isAboveZero(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble >= 0.00 ? true : false;
}
public boolean isBelowFive(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble <= 5.00 ? true : false;
}
public void updateScreen()
{
	this.number.updateCursorCounter();
}
/**
public void mouseClicked(int par1, int par2, int par3)
{
	super.mouseClicked(par1, par2, par3);
	this.number.mouseClicked(par1, par2, par3);
}
public void keyTyped(char par1, int par2)
{
	this.number.textboxKeyTyped(par1, par2);
	((GuiButton)this.buttonList.get(0)).enabled = this.number.getText().trim().length() > 0;
	if (par2 == 28 || par2 == 156)
	{
		this.actionPerformed((GuiButton)this.buttonList.get(0));
	}
}**/
@Override
protected void actionPerformed(GuiButton guiButton)
{
	switch (guiButton.id)
	{
	case 0:
		this.mc.displayGuiScreen((GuiScreen)null);
		break;
	case 1:
		Double heightInDoubles = Double.parseDouble(gravLiftHeight);
		if (heightInDoubles != 0.0)
		{
			heightInDoubles -= 0.1;
		}
		gravLiftHeight = heightInDoubles.toString();
		number.setText(gravLiftHeight);
		break;
	case 2:
		Double heightInDoubles1 = Double.parseDouble(gravLiftHeight);
		if (heightInDoubles1 < 1.0)
		{
			heightInDoubles1 = 0.0;
		}
		else
		{
			heightInDoubles1 -= 1.0;
		}
		gravLiftHeight = heightInDoubles1.toString();
		number.setText(gravLiftHeight);
		break;
	case 3:
		Double theHeight = Double.parseDouble(gravLiftHeight);
		if (theHeight != 5.0)
		{
			theHeight += 0.1;
		}
		gravLiftHeight = theHeight.toString();
		number.setText(gravLiftHeight);
		break;
	case 4:
		Double theNumber = Double.parseDouble(gravLiftHeight);
		if (theNumber > 4.0)
		{
			theNumber = 5.0;
		}
		else
		{
			theNumber += 1.0;
		}
		gravLiftHeight = theNumber.toString();
		number.setText(gravLiftHeight);
		System.out.println(tileEntity.height);
		int x = tileEntity.xCoord;
		int y = tileEntity.yCoord;
		int z = tileEntity.zCoord;
		PacketDispatcher.sendPacketToAllPlayers(new PacketBlockChange(theNumber, tileEntity, x, y, z).makePacket());
		default:
			break;
	}
}
}

 

TileEntityGravityLift.java

package kris91268.lbd.Tileentity;

import java.awt.List;

import kris91268.lbd.Blocks.BlockGravityLift;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagDouble;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

/**
* 
* @author Arbiter
*
*/
public class TileEntityGravityLift extends TileEntity
{
private String aString;
public Double height = new Double(0.0D);			

public void readFromNBT(NBTTagCompound par1NBTTagCompound)
{
	super.readFromNBT(par1NBTTagCompound);
	height = par1NBTTagCompound.getDouble("height");
}
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
{
	super.writeToNBT(par1NBTTagCompound);
	par1NBTTagCompound.setDouble("height", height);
}
public boolean isUsableByPlayer(EntityPlayer par1EntityPlayer)
{
	return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : 
		par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
}
public void something(String par1Str)
{
	this.aString = par1Str;
}
public void bindHeightToTileEntity(double theHeight)
{
	this.height = theHeight;
}
}

 

Tell me if you need any other files

 

And again, thanks for the help you have given me so far.

Link to comment
Share on other sites

Well, I don't think this will solve the nullpointer (could you post the stacktrace?), but here are two things that definately are needed:

 

1. In the GUI class where you send the packet, you're using "PacketDispatcher.sendPacketToAllPlayers()". However, this method is used to send data from the server to all the clients (players). You obviously need the opposite. Use "PacketDispatcher.sendPacketToServer()" instead.

2. Do you have your PacketHandler registered? Make sure you have the @NetworkMod annotation on top of your main mod class (under or above the @Mod annotation). This should work:

 

@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {PacketBase.CHANNEL}, packetHandler = PacketHandler.class)

Author of PneumaticCraft, MineChess, Minesweeper Mod and Sokoban Mod. Visit www.minemaarten.com to take a look at them.

Link to comment
Share on other sites

Well, I don't think this will solve the nullpointer (could you post the stacktrace?), but here are two things that definately are needed:

 

1. In the GUI class where you send the packet, you're using "PacketDispatcher.sendPacketToAllPlayers()". However, this method is used to send data from the server to all the clients (players). You obviously need the opposite. Use "PacketDispatcher.sendPacketToServer()" instead.

2. Do you have your PacketHandler registered? Make sure you have the @NetworkMod annotation on top of your main mod class (under or above the @Mod annotation). This should work:

 

@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {PacketBase.CHANNEL}, packetHandler = PacketHandler.class)

 

I have all of the required fields under NetworkMod, and if I try using the sendPacketToServer() method, the game just crashes and says that a packet cannot be sent to a server.

 

Here is the stacktrace for using the sendPacketToAllPlayers() method

Jul 30, 2013 4:03:58 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker
2013-07-30 16:03:58 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.2.7.779 for Minecraft 1.6.2 loading
2013-07-30 16:03:58 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_21, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
2013-07-30 16:03:59 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2013-07-30 16:03:59 [iNFO] [sTDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg
2013-07-30 16:03:59 [iNFO] [sTDOUT] Loaded 107 rules from AccessTransformer config file forge_at.cfg
2013-07-30 16:03:59 [sEVERE] [ForgeModLoader] The binary patch set is missing. Things are probably about to go very wrong.
2013-07-30 16:03:59 [iNFO] [ForgeModLoader] Launching wrapped minecraft
2013-07-30 16:04:00 [iNFO] [Minecraft-Client] Setting user: Player170
2013-07-30 16:04:00 [iNFO] [Minecraft-Client] (Session ID is null)
2013-07-30 16:04:02 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0
2013-07-30 16:04:03 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default
2013-07-30 16:04:03 [iNFO] [sTDOUT] 
2013-07-30 16:04:03 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-07-30 16:04:03 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization
2013-07-30 16:04:03 [iNFO] [sTDOUT] MinecraftForge v9.10.0.779 Initialized
2013-07-30 16:04:03 [iNFO] [ForgeModLoader] MinecraftForge v9.10.0.779 Initialized
2013-07-30 16:04:03 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-07-30 16:04:03 [iNFO] [sTDOUT]     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2013-07-30 16:04:03 [iNFO] [sTDOUT] Replaced 101 ore recipies
2013-07-30 16:04:03 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization
2013-07-30 16:04:03 [iNFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\config\logging.properties
2013-07-30 16:04:03 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2013-07-30 16:04:03 [iNFO] [sTDOUT] OpenAL initialized.
2013-07-30 16:04:04 [iNFO] [ForgeModLoader] Searching C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\mods for mods
2013-07-30 16:04:04 [iNFO] [sTDOUT] 
2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load
2013-07-30 16:04:11 [iNFO] [mcp] Activating mod mcp
2013-07-30 16:04:11 [iNFO] [FML] Activating mod FML
2013-07-30 16:04:11 [iNFO] [Forge] Activating mod Forge
2013-07-30 16:04:11 [iNFO] [fireworks] Activating mod fireworks
2013-07-30 16:04:11 [iNFO] [LightBridgesAndDoors] Activating mod LightBridgesAndDoors
2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Registering Forge Packet Handler
2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSource.png
2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightSection.png
2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSourceActive.png
2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightDoorSource.png
2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/gravityLift.png
2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSection.png
2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightBridgeSource.png
2013-07-30 16:04:13 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png
2013-07-30 16:04:13 [WARNING] [ForgeModLoader] Mod LightBridgesAndDoors attempted to register a gui network handler during a construction phase
2013-07-30 16:04:13 [iNFO] [sTDERR] java.net.UnknownHostException: www.light-bridges-and-doors-mod.webnode.com
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.net.PlainSocketImpl.connect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.net.SocksSocketImpl.connect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.net.Socket.connect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.net.Socket.connect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.NetworkClient.doConnect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.openServer(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.openServer(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.<init>(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.New(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.New(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at kris91268.lbd.UpdateChecker.checkForUpdate(UpdateChecker.java:39)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at kris91268.lbd.ModLBD.init(ModLBD.java:178)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:193)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:104)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:506)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-07-30 16:04:13 [iNFO] [sTDOUT] [LightBridgesAndDoors] Failed to find http://www.light-bridges-and-doors-mod.webnode.com/changelog/, prehaps you are not connected to the internet
2013-07-30 16:04:13 [iNFO] [sTDOUT] www.light-bridges-and-doors-mod.webnode.com
2013-07-30 16:04:13 [iNFO] [sTDOUT] Failed to load from the website
2013-07-30 16:04:13 [iNFO] [sTDERR] java.lang.NullPointerException
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at kris91268.lbd.UpdateChecker.isThereANewUpdate(UpdateChecker.java:66)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at kris91268.lbd.ModLBD.init(ModLBD.java:180)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:193)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:104)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:506)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-30 16:04:13 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-07-30 16:04:13 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 5 mods
2013-07-30 16:04:13 [WARNING] [Fireworks+] Mod Fireworks+ is missing a pack.mcmeta file, things may not work well
2013-07-30 16:04:13 [WARNING] [kris91268's Light Bridges and Doors] Mod kris91268's Light Bridges and Doors is missing a pack.mcmeta file, things may not work well
2013-07-30 16:04:13 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Fireworks+, FMLFileResourcePack:kris91268's Light Bridges and Doors
2013-07-30 16:04:13 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png
2013-07-30 16:04:13 [iNFO] [sTDOUT] 
2013-07-30 16:04:13 [iNFO] [sTDOUT] SoundSystem shutting down...
2013-07-30 16:04:13 [iNFO] [sTDOUT]     Author: Paul Lamb, www.paulscode.com
2013-07-30 16:04:13 [iNFO] [sTDOUT] 
2013-07-30 16:04:13 [iNFO] [sTDOUT] 
2013-07-30 16:04:13 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-07-30 16:04:13 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-07-30 16:04:13 [iNFO] [sTDOUT]     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2013-07-30 16:04:14 [iNFO] [sTDOUT] OpenAL initialized.
2013-07-30 16:04:14 [sEVERE] [Minecraft-Client] Realms: Server not available!
2013-07-30 16:04:14 [iNFO] [sTDOUT] 
2013-07-30 16:04:19 [iNFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.2
2013-07-30 16:04:19 [iNFO] [Minecraft-Server] Generating keypair
2013-07-30 16:04:20 [iNFO] [ForgeModLoader] Loading dimension 0 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@6cf81618)
2013-07-30 16:04:20 [iNFO] [ForgeModLoader] Loading dimension 1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@6cf81618)
2013-07-30 16:04:20 [iNFO] [ForgeModLoader] Loading dimension -1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@6cf81618)
2013-07-30 16:04:20 [iNFO] [Minecraft-Server] Preparing start region for level 0
2013-07-30 16:04:21 [iNFO] [sTDOUT] loading single player
2013-07-30 16:04:21 [iNFO] [Minecraft-Server] Player170[/127.0.0.1:0] logged in with entity id 113 at (196.1191858953188, 67.0, -39.81733750857464)
2013-07-30 16:04:21 [iNFO] [Minecraft-Server] Player170 joined the game
2013-07-30 16:04:22 [iNFO] [sTDOUT] Setting up custom skins
2013-07-30 16:04:22 [iNFO] [sTDERR] java.net.UnknownHostException: skins.minecraft.net
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.PlainSocketImpl.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.SocksSocketImpl.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.Socket.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.Socket.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.NetworkClient.doConnect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.openServer(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.openServer(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.<init>(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.New(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.New(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.ThreadDownloadImageDataINNER1.run(ThreadDownloadImageDataINNER1.java:30)
2013-07-30 16:04:22 [iNFO] [sTDERR] java.net.UnknownHostException: skins.minecraft.net
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.PlainSocketImpl.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.SocksSocketImpl.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.Socket.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at java.net.Socket.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.NetworkClient.doConnect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.openServer(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.openServer(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.<init>(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.New(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.http.HttpClient.New(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
2013-07-30 16:04:22 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.ThreadDownloadImageDataINNER1.run(ThreadDownloadImageDataINNER1.java:30)
2013-07-30 16:04:24 [iNFO] [sTDOUT] 1.0
2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Stopping server
2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Saving players
2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Player170 left the game
2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Saving worlds
2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Overworld
2013-07-30 16:04:25 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Nether
2013-07-30 16:04:25 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/The End
2013-07-30 16:04:25 [iNFO] [ForgeModLoader] Unloading dimension 0
2013-07-30 16:04:25 [iNFO] [ForgeModLoader] Unloading dimension -1
2013-07-30 16:04:25 [iNFO] [ForgeModLoader] Unloading dimension 1
2013-07-30 16:04:25 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Exception in world tick
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1932)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-07-30 16:04:25 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:45)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.multiplayer.NetClientHandler.handleCustomPayload(NetClientHandler.java:1647)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:281)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.multiplayer.WorldClient.tick(WorldClient.java:99)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1916)
2013-07-30 16:04:25 [iNFO] [sTDERR] 	... 9 more
2013-07-30 16:04:25 [iNFO] [sTDOUT] ---- Minecraft Crash Report ----
2013-07-30 16:04:25 [iNFO] [sTDOUT] // Shall we play a game?
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] Time: 30/07/13 4:04 PM
2013-07-30 16:04:25 [iNFO] [sTDOUT] Description: Exception in world tick
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] java.lang.NullPointerException
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:45)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.NetClientHandler.handleCustomPayload(NetClientHandler.java:1647)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:281)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.WorldClient.tick(WorldClient.java:99)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1916)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:
2013-07-30 16:04:25 [iNFO] [sTDOUT] ---------------------------------------------------------------------------------------
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] -- Head --
2013-07-30 16:04:25 [iNFO] [sTDOUT] Stacktrace:
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:45)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.NetClientHandler.handleCustomPayload(NetClientHandler.java:1647)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:281)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] -- Affected level --
2013-07-30 16:04:25 [iNFO] [sTDOUT] Details:
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level name: MpServer
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	All players: 1 total; [EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82]]
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Chunk stats: MultiplayerChunkCache: 310
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level seed: 0
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level generator: ID 00 - default, ver 1. Features enabled: false
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level generator options: 
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level spawn location: World: (192,64,-44), Chunk: (at 0,4,4 in 12,-3; contains blocks 192,0,-48 to 207,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level time: 14484 game time, 887 day time
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level dimension: 0
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level storage version: 0x00000 - Unknown?
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Forced entities: 31 total; [EntityBat['Bat'/64, l='MpServer', x=160.45, y=36.01, z=-37.44], EntityBat['Bat'/77, l='MpServer', x=198.75, y=47.10, z=-53.47], EntityBat['Bat'/78, l='MpServer', x=201.45, y=47.06, z=-48.90], EntityBat['Bat'/79, l='MpServer', x=197.34, y=47.81, z=-47.51], EntityBat['Bat'/72, l='MpServer', x=185.63, y=24.10, z=-23.25], EntityBat['Bat'/87, l='MpServer', x=221.62, y=44.39, z=-61.07], EntityBat['Bat'/86, l='MpServer', x=210.25, y=34.10, z=-75.06], EntityItem['item.tile.grass'/81, l='MpServer', x=200.72, y=67.13, z=-38.91], EntityItem['item.tile.lbd:gravityLift'/80, l='MpServer', x=197.19, y=67.13, z=-41.53], EntityBat['Bat'/82, l='MpServer', x=199.69, y=21.10, z=-17.09], EntityBat['Bat'/93, l='MpServer', x=237.75, y=32.10, z=-45.25], EntityBat['Bat'/92, l='MpServer', x=238.43, y=41.84, z=-51.22], EntityBat['Bat'/95, l='MpServer', x=237.19, y=31.60, z=-50.48], EntityBat['Bat'/94, l='MpServer', x=231.14, y=36.84, z=-48.66], EntityPig['Pig'/89, l='MpServer', x=230.69, y=69.00, z=-107.09], EntityBat['Bat'/88, l='MpServer', x=215.25, y=52.10, z=-55.50], EntityBat['Bat'/91, l='MpServer', x=225.56, y=44.10, z=-67.69], EntityPig['Pig'/90, l='MpServer', x=230.25, y=69.00, z=-104.94], EntityPig['Pig'/103, l='MpServer', x=260.53, y=66.00, z=-107.56], EntityPig['Pig'/100, l='MpServer', x=254.22, y=64.00, z=-96.03], EntityBat['Bat'/101, l='MpServer', x=242.63, y=35.10, z=-48.25], EntityBat['Bat'/98, l='MpServer', x=254.75, y=53.10, z=-94.31], EntityPig['Pig'/99, l='MpServer', x=252.44, y=64.00, z=-95.53], EntityPig['Pig'/96, l='MpServer', x=249.47, y=65.00, z=-98.53], EntityPig['Pig'/97, l='MpServer', x=252.91, y=67.00, z=-107.53], EntityPig['Pig'/106, l='MpServer', x=270.81, y=64.00, z=-40.34], EntityPig['Pig'/107, l='MpServer', x=275.28, y=64.00, z=-57.78], EntityPig['Pig'/104, l='MpServer', x=260.03, y=63.00, z=-59.91], EntityPig['Pig'/105, l='MpServer', x=262.14, y=63.00, z=-48.97], EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82], EntityBat['Bat'/63, l='MpServer', x=170.75, y=48.10, z=-108.69]]
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Retry entities: 0 total; []
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Server brand: fml,forge
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Server type: Integrated singleplayer server
2013-07-30 16:04:25 [iNFO] [sTDOUT] Stacktrace:
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1929)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] -- Affected level --
2013-07-30 16:04:25 [iNFO] [sTDOUT] Details:
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level name: MpServer
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	All players: 1 total; [EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82]]
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Chunk stats: MultiplayerChunkCache: 310
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level seed: 0
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level generator: ID 00 - default, ver 1. Features enabled: false
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level generator options: 
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level spawn location: World: (192,64,-44), Chunk: (at 0,4,4 in 12,-3; contains blocks 192,0,-48 to 207,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level time: 14484 game time, 887 day time
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level dimension: 0
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level storage version: 0x00000 - Unknown?
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Forced entities: 31 total; [EntityBat['Bat'/64, l='MpServer', x=160.45, y=36.01, z=-37.44], EntityBat['Bat'/77, l='MpServer', x=198.75, y=47.10, z=-53.47], EntityBat['Bat'/78, l='MpServer', x=201.45, y=47.06, z=-48.90], EntityBat['Bat'/79, l='MpServer', x=197.34, y=47.81, z=-47.51], EntityBat['Bat'/72, l='MpServer', x=185.63, y=24.10, z=-23.25], EntityBat['Bat'/87, l='MpServer', x=221.62, y=44.39, z=-61.07], EntityBat['Bat'/86, l='MpServer', x=210.25, y=34.10, z=-75.06], EntityItem['item.tile.grass'/81, l='MpServer', x=200.72, y=67.13, z=-38.91], EntityItem['item.tile.lbd:gravityLift'/80, l='MpServer', x=197.19, y=67.13, z=-41.53], EntityBat['Bat'/82, l='MpServer', x=199.69, y=21.10, z=-17.09], EntityBat['Bat'/93, l='MpServer', x=237.75, y=32.10, z=-45.25], EntityBat['Bat'/92, l='MpServer', x=238.43, y=41.84, z=-51.22], EntityBat['Bat'/95, l='MpServer', x=237.19, y=31.60, z=-50.48], EntityBat['Bat'/94, l='MpServer', x=231.14, y=36.84, z=-48.66], EntityPig['Pig'/89, l='MpServer', x=230.69, y=69.00, z=-107.09], EntityBat['Bat'/88, l='MpServer', x=215.25, y=52.10, z=-55.50], EntityBat['Bat'/91, l='MpServer', x=225.56, y=44.10, z=-67.69], EntityPig['Pig'/90, l='MpServer', x=230.25, y=69.00, z=-104.94], EntityPig['Pig'/103, l='MpServer', x=260.53, y=66.00, z=-107.56], EntityPig['Pig'/100, l='MpServer', x=254.22, y=64.00, z=-96.03], EntityBat['Bat'/101, l='MpServer', x=242.63, y=35.10, z=-48.25], EntityBat['Bat'/98, l='MpServer', x=254.75, y=53.10, z=-94.31], EntityPig['Pig'/99, l='MpServer', x=252.44, y=64.00, z=-95.53], EntityPig['Pig'/96, l='MpServer', x=249.47, y=65.00, z=-98.53], EntityPig['Pig'/97, l='MpServer', x=252.91, y=67.00, z=-107.53], EntityPig['Pig'/106, l='MpServer', x=270.81, y=64.00, z=-40.34], EntityPig['Pig'/107, l='MpServer', x=275.28, y=64.00, z=-57.78], EntityPig['Pig'/104, l='MpServer', x=260.03, y=63.00, z=-59.91], EntityPig['Pig'/105, l='MpServer', x=262.14, y=63.00, z=-48.97], EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82], EntityBat['Bat'/63, l='MpServer', x=170.75, y=48.10, z=-108.69]]
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Retry entities: 0 total; []
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Server brand: fml,forge
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Server type: Integrated singleplayer server
2013-07-30 16:04:25 [iNFO] [sTDOUT] 
2013-07-30 16:04:25 [iNFO] [sTDOUT] -- System Details --
2013-07-30 16:04:25 [iNFO] [sTDOUT] Details:
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Minecraft Version: 1.6.2
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Operating System: Windows 7 (amd64) version 6.1
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Java Version: 1.7.0_21, Oracle Corporation
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Memory: 802305360 bytes (765 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	AABB Pool Size: 3251 (182056 bytes; 0 MB) allocated, 373 (20888 bytes; 0 MB) used
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Suspicious classes: FML and Forge are installed
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	FML: MCP v8.04 FML v6.2.7.779 Minecraft Forge 9.10.0.779 5 mods loaded, 5 mods active
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	FML{6.2.7.779} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Forge{9.10.0.779} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	fireworks{0.1.0} [Fireworks+] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	LightBridgesAndDoors{0.1.5} [kris91268's Light Bridges and Doors] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Launched Version: 1.6
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	LWJGL: 2.9.0
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	OpenGL: Intel(R) HD Graphics 4000 GL version 3.3.0 - Build 8.15.10.2653, Intel
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Is Modded: Definitely; Client brand changed to 'fml,forge'
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Type: Client (map_client.txt)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Resource Pack: Default
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Current Language: English (US)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Profiler Position: N/A (disabled)
2013-07-30 16:04:25 [iNFO] [sTDOUT] 	Vec3 Pool Size: 571 (31976 bytes; 0 MB) allocated, 62 (3472 bytes; 0 MB) used
2013-07-30 16:04:25 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\.\crash-reports\crash-2013-07-30_16.04.25-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed

 

And here is the stacktrace when using the sendPacketToServer() method

Jul 30, 2013 7:53:20 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker
2013-07-30 19:53:20 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.2.7.779 for Minecraft 1.6.2 loading
2013-07-30 19:53:20 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_21, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
2013-07-30 19:53:20 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2013-07-30 19:53:20 [iNFO] [sTDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg
2013-07-30 19:53:20 [iNFO] [sTDOUT] Loaded 107 rules from AccessTransformer config file forge_at.cfg
2013-07-30 19:53:21 [sEVERE] [ForgeModLoader] The binary patch set is missing. Things are probably about to go very wrong.
2013-07-30 19:53:21 [iNFO] [ForgeModLoader] Launching wrapped minecraft
2013-07-30 19:53:22 [iNFO] [Minecraft-Client] Setting user: Player30
2013-07-30 19:53:22 [iNFO] [Minecraft-Client] (Session ID is null)
2013-07-30 19:53:24 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0
2013-07-30 19:53:25 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default
2013-07-30 19:53:25 [iNFO] [sTDOUT] 
2013-07-30 19:53:25 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-07-30 19:53:25 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization
2013-07-30 19:53:25 [iNFO] [sTDOUT] MinecraftForge v9.10.0.779 Initialized
2013-07-30 19:53:25 [iNFO] [ForgeModLoader] MinecraftForge v9.10.0.779 Initialized
2013-07-30 19:53:25 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-07-30 19:53:25 [iNFO] [sTDOUT]     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2013-07-30 19:53:26 [iNFO] [sTDOUT] OpenAL initialized.
2013-07-30 19:53:26 [iNFO] [sTDOUT] Replaced 101 ore recipies
2013-07-30 19:53:26 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization
2013-07-30 19:53:26 [iNFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\config\logging.properties
2013-07-30 19:53:26 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2013-07-30 19:53:26 [iNFO] [sTDOUT] 
2013-07-30 19:53:26 [iNFO] [ForgeModLoader] Searching C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\mods for mods
2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load
2013-07-30 19:53:34 [iNFO] [mcp] Activating mod mcp
2013-07-30 19:53:34 [iNFO] [FML] Activating mod FML
2013-07-30 19:53:34 [iNFO] [Forge] Activating mod Forge
2013-07-30 19:53:34 [iNFO] [fireworks] Activating mod fireworks
2013-07-30 19:53:34 [iNFO] [LightBridgesAndDoors] Activating mod LightBridgesAndDoors
2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Registering Forge Packet Handler
2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSource.png
2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightSection.png
2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSourceActive.png
2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightDoorSource.png
2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/gravityLift.png
2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSection.png
2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightBridgeSource.png
2013-07-30 19:53:36 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png
2013-07-30 19:53:36 [WARNING] [ForgeModLoader] Mod LightBridgesAndDoors attempted to register a gui network handler during a construction phase
2013-07-30 19:53:37 [iNFO] [sTDOUT] [LightBridgesAndDoors] Successfully loaded info from http://www.light-bridges-and-doors-mod.webnode.com/changelog/
2013-07-30 19:53:37 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 5 mods
2013-07-30 19:53:37 [WARNING] [Fireworks+] Mod Fireworks+ is missing a pack.mcmeta file, things may not work well
2013-07-30 19:53:37 [WARNING] [kris91268's Light Bridges and Doors] Mod kris91268's Light Bridges and Doors is missing a pack.mcmeta file, things may not work well
2013-07-30 19:53:37 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Fireworks+, FMLFileResourcePack:kris91268's Light Bridges and Doors
2013-07-30 19:53:38 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png
2013-07-30 19:53:38 [iNFO] [sTDOUT] 
2013-07-30 19:53:38 [iNFO] [sTDOUT] SoundSystem shutting down...
2013-07-30 19:53:38 [iNFO] [sTDOUT]     Author: Paul Lamb, www.paulscode.com
2013-07-30 19:53:38 [iNFO] [sTDOUT] 
2013-07-30 19:53:38 [iNFO] [sTDOUT] 
2013-07-30 19:53:38 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-07-30 19:53:38 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-07-30 19:53:38 [iNFO] [sTDOUT]     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2013-07-30 19:53:38 [iNFO] [sTDOUT] OpenAL initialized.
2013-07-30 19:53:39 [iNFO] [sTDOUT] 
2013-07-30 19:53:39 [sEVERE] [Minecraft-Client] Realms: Invalid session id
2013-07-30 19:53:44 [iNFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.2
2013-07-30 19:53:44 [iNFO] [Minecraft-Server] Generating keypair
2013-07-30 19:53:45 [iNFO] [ForgeModLoader] Loading dimension 0 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@2c27973)
2013-07-30 19:53:45 [iNFO] [ForgeModLoader] Loading dimension 1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@2c27973)
2013-07-30 19:53:45 [iNFO] [ForgeModLoader] Loading dimension -1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@2c27973)
2013-07-30 19:53:45 [iNFO] [Minecraft-Server] Preparing start region for level 0
2013-07-30 19:53:47 [iNFO] [sTDOUT] loading single player
2013-07-30 19:53:47 [iNFO] [Minecraft-Server] Player30[/127.0.0.1:0] logged in with entity id 113 at (196.1191858953188, 67.0, -39.81733750857464)
2013-07-30 19:53:47 [iNFO] [Minecraft-Server] Player30 joined the game
2013-07-30 19:53:47 [iNFO] [sTDOUT] Setting up custom skins
2013-07-30 19:53:49 [iNFO] [sTDOUT] 0.0
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Player30 left the game
2013-07-30 19:53:49 [iNFO] [sTDERR] kris91268.lbd.Packet.PacketBase$ProtocolException: Cannot send packet to server
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:51)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.network.NetServerHandler.handleCustomPayload(NetServerHandler.java:1111)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:689)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:585)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
2013-07-30 19:53:49 [iNFO] [sTDERR] 	at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Player30 lost connection: 
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Player30 left the game
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Stopping singleplayer server as player logged out
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Stopping server
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Saving players
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Saving worlds
2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Overworld
2013-07-30 19:53:50 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Nether
2013-07-30 19:53:50 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/The End
2013-07-30 19:53:50 [iNFO] [ForgeModLoader] Unloading dimension 0
2013-07-30 19:53:50 [iNFO] [ForgeModLoader] Unloading dimension -1
2013-07-30 19:53:50 [iNFO] [ForgeModLoader] Unloading dimension 1

 

I know it is coded to throw an exception if the world type is server, but I was taught that that was the best way.

Link to comment
Share on other sites

your tile entity is not being created because your block class is not Overring the method hasTileEntity

 

@Override
public boolean hasTileEntity(int meta) {
return true;
}

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

-hydroflame, author of the forge revolution-

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • The future of Bitcoin recovery is a topic of great interest and excitement, particularly with the emergence of innovative companies like Dexdert Net Pro Recovery leading the charge. As the cryptocurrency market continues to evolve and face new challenges, the need for effective solutions to help users recover lost or stolen Bitcoin has become increasingly critical. Dexdert Net Pro, a specialized firm dedicated to this very purpose, has positioned itself at the forefront of this emerging field. Through their proprietary techniques and deep expertise in blockchain technology, Dexdert Net Pro has developed a comprehensive approach to tracking down and retrieving misplaced or compromised Bitcoin, providing a lifeline to individuals and businesses who have fallen victim to the inherent risks of the digital currency landscape. Their team of seasoned investigators and cryptography experts employ a meticulous, multi-pronged strategy, leveraging advanced data analysis, forensic techniques, and collaborative partnerships with law enforcement to painstakingly trace the movement of lost or stolen coins, often recovering funds that would otherwise be considered irrecoverable. This pioneering work not only restores financial assets but also helps to bolster confidence and trust in the long-term viability of Bitcoin, cementing Dexdert Net Pro role as a crucial player in shaping the future of cryptocurrency recovery and security. As the digital finance ecosystem continues to evolve, the importance of innovative solutions like those offered by Dexdert Net Pro will only grow, ensuring that users can navigate the complexities of Bitcoin with greater peace of mind and protection. Call Dexdert Net Pro now     
    • I'm developing a dimension, but it's kinda resource intensive so some times during player teleporting it lags behind making the player phase down into the void, so im trying to implement some kind of pregeneration to force the game loading a small set of chunks in the are the player will teleport to. Some of the things i've tried like using ServerLevel and ServerChunkCache methods like getChunk() dont actually trigger chunk generation if the chunk isn't already on persistent storage (already generated) or placing tickets, but that doesn't work either. Ideally i should be able to check when the task has ended too. I've peeked around some pregen engines, but they're too complex for my current understanding of the system of which I have just a basic understanding (how ServerLevel ,ServerChunkCache  and ChunkMap work) of. Any tips or other classes I should be looking into to understand how to do this correctly?
    • https://mclo.gs/4UC49Ao
    • Way back in the Forge 1.17 days, work started for adding JPMS (Java Platform Module Support) to ModLauncher and ForgeModLoader. This has been used internally by Forge and some libraries for a while now, but mods (those with mods.toml specifically) have not been able to take advantage of it. As of Forge 1.21.1 and 1.21.3, this is now possible!   What is JPMS and what does it mean for modders? JPMS is the Java Platform Module System, introduced in Java 9. It allows you to define modules, which are collections of packages and resources that can be exported or hidden from other modules. This allows for much more fine-tuned control over visibility, cleaner syntax for service declarations and support for sealed types across packages. For example, you might have a mod with a module called `com.example.mod` that exports `com.example.mod.api` and `com.example.mod.impl` to other mods, but hides `com.example.mod.internal` from them. This would allow you to have a clean API for other mods to use, while keeping your internal implementation details hidden from IDE hints, helping prevent accidental usage of internals that might break without prior notice. This is particularly useful if you'd like to use public records with module-private constructors or partially module-private record components, as you can create a sealed interface that only your record implements, having the interface be exported and the record hidden. It's also nice for declaring and using services, as you'll get compile-time errors from the Java compiler for typos and the like, rather than deferring to runtime errors. In more advanced cases, you can also have public methods that are only accessible to specific other modules -- handy if you want internal interactions between multiple of your own mods.   How do I bypass it? We understand there may be drama in implementing a system that prevents mods from accessing each other's internals when necessary (like when a mod is abandoned or you need to fix a compat issue) -- after all, we are already modding a game that doesn't have explicit support for Java mods yet. We have already thought of this and are offering APIs from day one to selectively bypass module restrictions. Let me be clear: Forge mods are not required to use JPMS. If you don't want to use it, you don't have to. The default behaviour is to have fully open, fully exported automatic modules. In Java, you can use the `Add-Opens` and `Add-Exports` manifest attributes to selectively bypass module restrictions of other mods at launch time, and we've added explicit support for these when loading your Forge mods. At compile-time, you can use existing solutions such as the extra-java-module-info Gradle plugin to deal with non-modular dependencies and add extra opens and exports to other modules. Here's an example on how to make the internal package `com.example.examplemod.internal` open to your mod in your build.gradle: tasks.named('jar', Jar) { manifest { attributes([ 'Add-Opens' : 'com.example.examplemod/com.example.examplemod.internal' 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors // (...) ]) } } With the above in your mod's jar manifest, you can now reflectively access the classes inside that internal package. Multiple entries are separated with a space, as per Java's official spec. You can also use Add-Exports to directly call without reflection, however you'd need to use the Gradle plugin mentioned earlier to be able to compile. The syntax for Add-Exports is the same as Add-Opens, and instructions for the compile-time step with the Gradle plugin are detailed later in this post. Remember to prefer the opens and exports keywords inside module-info.java for sources you control. The Add-Opens/Add-Exports attributes are only intended for forcing open other mods.   What else is new with module support? Previously, the runtime module name was always forced to the first mod ID in your `mods.toml` file and all packages were forced fully open and exported. Module names are now distinguished from mod IDs, meaning the module name in your module-info.java can be different from the mod ID in your `mods.toml`. This allows you to have a more descriptive module name that doesn't have to be the same as your mod ID, however we strongly recommend including your mod ID as part of your module name to aid troubleshooting. The `Automatic-Module-Name` manifest attribute is now also honoured, allowing you to specify a module name for your mod without needing to create a `module-info.java` file. This is particularly useful for mods that don't care about JPMS features but want to have a more descriptive module name and easier integration with other mods that do use JPMS.   How do I use it? The first step is to create a `module-info.java` file in your mod's source directory. This file should be in the same package as your main mod class, and should look something like this: open module com.example.examplemod { requires net.minecraftforge.eventbus; requires net.minecraftforge.fmlcore; requires net.minecraftforge.forge; requires net.minecraftforge.javafmlmod; requires net.minecraftforge.mergetool.api; requires org.slf4j; requires logging; } For now, we're leaving the whole module open to reflection, which is a good starting point. When we know we want to close something off, we can remove the open modifier from the module and open or export individual packages instead. Remember that you need to be open to Forge (module name net.minecraftforge.forge), otherwise it can't call your mod's constructor. Next is fixing modules in Gradle. While Forge and Java support modules properly, Gradle does not put automatic modules on the module path by default, meaning that the logging module (from com.mojang:logging) is not found. To fix this, add the Gradle plugin and add a compile-time module definition for that Mojang library: plugins { // (...) id 'org.gradlex.extra-java-module-info' version "1.9" } // (...) extraJavaModuleInfo { failOnMissingModuleInfo = false automaticModule("com.mojang:logging", "logging") } The automatic module override specified in your build.gradle should match the runtime one to avoid errors. You can do the same for any library or mod dependency that is missing either a module-info or explicit Automatic-Module-Name, however be aware that you may need to update your mod once said library adds one. That's all you need to get started with module support in your mods. You can learn more about modules and how to use them at dev.java.
    • Faire la mise à jour grâce à ce lien m'a aider personnellement, merci à @Paint_Ninja. https://www.amd.com/en/support 
  • Topics

×
×
  • Create New...

Important Information

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