Everything posted by TLHPoE
-
Null Pointer Exception on NBT
coolAlias: I got the idea of doing this from your tutorial, but I just want to use this way.
-
Adding a delay?
Is there a method that Forge has to wait x amount of seconds and continue as usual?
-
Null Pointer Exception on NBT
Ok, just rewrote my code so that it returns if anything is null. http://pastebin.com/ZdN6knXV Only problem now is that the NBT tag gets reset on death or when the player leaves the world and rejoins.
-
Null Pointer Exception on NBT
Isn't EntityPlayer player = (EntityPlayer)event.entity; if(player != null){} the same as if (event.entity instanceof EntityPlayer){} Also, I did that event.world, I created a world and crashed. Error http://pastebin.com/yzFYunLL
-
Null Pointer Exception on NBT
I did the worldObj here: http://pastebin.com/Q9mbbL1j Here's the new error that pops up: http://pastebin.com/ANLXMWvC
-
Changing Swing Speed
Why not look into the Haste effect? I think you'd be better off making a pseudo potion item instead of using the vanilla potion class.
-
Null Pointer Exception on NBT
I'm getting a null pointer exception on line 30. I don't see anything wrong? http://pastebin.com/cYQraBDd
-
Checking if a NBT exists?
I'm adding integers into a NBTTagCompound. Currently trying to get the NBT at a different class, but that class fires before the NBT class. Is there anyway to check if the NBT exists?
-
Using WorldSavedData?
Thanks, it's working now.
-
Using WorldSavedData?
I have no idea where to go from here: http://pastebin.com/YuR3FJHB How would I write to the NBTTagCompound? I know how to get the world from the player, but no clue how to get the NBTTagCompound from the world.
- Using WorldSavedData?
-
Using WorldSavedData?
Sorry to sound dumb but, I've never really touched on Entities or TileEntities. I'm confused on the 2 read/write NBT methods. Do I do something like this: NBTTagCompound nbt = new NBTTagCompoind(); readFromNBT(nbt); I don't know how I would store any data in that.
-
Using WorldSavedData?
I'm using WorldSavedData to store a player's stat for a world, but I have no clue how to get/load to the world's NBTTagCompound. PlayerStatsUtil:
-
Gui texture getting cut off?
Fixed it, the image file had to be 256x256
-
Gui texture getting cut off?
I used Paint.net to make it. And I'm pretty sure the bottom right corner is transparent.
-
Gui texture getting cut off?
I'm trying to load a background for my GUI, but the bottom of the image keeps getting cut off. GuiInformationDisplay: Here's the image I'm trying to load: http://i.imgur.com/SmmJq7A.png
-
Vanilla block behavoir
You could add your own torch and overwrite the vanilla recipe. All of this can be done without editing base classes (Don't quote me on that).
-
Saving data externally without NBT?
Ok, I got rid of the WorldSavedData junk. It saves on death, but it still carries on to other worlds.
-
Textured Gui not loading properly?
I'm trying to add a background to my font, but it keeps rendering as 1 solid color. http://pastebin.com/mmt3mwQH
-
Saving data externally without NBT?
Got it to work, it saves my experience on death, but my experience carries on to other worlds. Is there something I need to do? http://pastebin.com/YgUU28jM
-
Saving data externally without NBT?
*Sorry for being an idiot on NBT How would I get access to the persistent NBT tag for players? Also how do I save/load to the WorldSaveData?
-
Saving data externally without NBT?
I'm currently using NBT Tags to load a stat for players. Since NBT Tags reset when the player dies (Don't quote me on this), is there anyway to store the data somewhere else and reload it when the player respawns?
-
Not saving/loading new player stat?
I'm trying to add a new player stat (gold), and when I enter my world, put some coins in, leave, and re-enter the same world, my gold gets reset. Am I doing something wrong? PlayerStatsHandler EventHandler PacketHandlerC
-
Getting to the bottom left corner of the screen?
I'm currently using fontRenderer.drawString(goldAmount, 2, 230, 0xFFFF00); to draw my text on the screen. How would I make it position exactly on the bottom left hand corner? The text's position changes when I resize my Minecraft window.
-
PacketHandler problems?
I keep getting this error My PacketHandler My NetworkMod @NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"terramagnachannel"}, packetHandler = terramagna.handlers.PacketHandlerC.class)
IPS spam blocked by CleanTalk.