Everything posted by Draco18s
-
Applied Energistics API help
[ForgeModLoader] Caught exception from AddedCompat: java.lang.NullPointerException You have a NPE. That is, you're trying to copy a stack that doesn't exist yet.
-
Find blocks with ID = x
Edit: Nevermind, I was being dumb.
-
What am I doing wrong?
Tile Entities are still blocks. There is still a block class involved, so feel free to utilize it.
-
Item NBT
Firstly: don't end all of your posts with as then no one will take you seriously, as that emoticon is essentially saying, "I'm joking!" Secondly: as NBT tags can only be applied to ItemStacks, it cannot go in your constructor.
-
Are There Tutorials For This Type of Thing?
Yeah, you're not going to be pulling that off anytime soon. Also, Stop Capitalizing Every Word Like its the Title of a Book. It Makes You Look Uneducated.
-
Item NBT
this.stackTagCompound = new NBTTagCompound("tag");
-
[SOLVED] Sword dynamic damage to entities (based on item damage)
addInformation does add tooltips, but I think that Multimap func_111205_h() is the one I was thinking of. If you're trying to override it and then get the multimap for your own purposes, super.func_111205_h() will give you what ItemSword is already adding, which you don't want. You'd have to look at the base Item class's implementation.
-
Textures not showing up
It can't find your texture.
-
[SOLVED] Sword dynamic damage to entities (based on item damage)
I think ItemSword handles that. I recall running across it recently, but not recently enough to remember where I saw it.
-
Textures not showing up
You only need this if you use more than one texture per block/item. If it's one texture you can do setTextureName("generic:picturename");
-
Call the normal block rendering in a custom renderer.
If you're trying to render a standard cube, use an ISimpleBlockRenderingHandler not a TileEntitySpecialRenderer
-
one block name overwriting the rest
...Yes, or it will have a default unlocalized name. If it has the default unlocalized name, then it will be identical to every other block with the default unlocalized name and that can't be uniquely localized!
-
What am I doing wrong?
protected BlockDirWTileEntity(int id) ?
-
Having trouble itterating through all items in the game
What vanilla item has the id 3877? That's right, NOTHING. What is an item that is NOTHING? Why it's NULL. Congradulations, you have a NPE.
-
Anyone else dreading 1.7 update?
The thing is, Mojang is trying to create their own, official, API so that Forge isn't needed for most mods.
-
Accesing other blocks variables.
No shit. Might want to go finish learning Java.
-
Accesing other blocks variables.
world.getBlockTileEntity(...)
-
[Solved]TileEntitySpecialRenderer not rendering based on adjacent blocks[1.6]
Gah! x..X Don't use static variables like that. While it's not messing up when executed, its generally not good practice. Those are prime examples of values that should be passed to the various functions that use them.
-
Tile Entity Problem
Look over my mod (the display pedestal linked above) as my block works in the exact way that you desire. Only the owner can open it (if owner is a blank string, then the first person to interact with it is the owner) and only the only can break it (or explosions, I specifically allow it to be destroyed by explosions).
-
Server side integer saving?
if(nbt != null) { nbt.setInteger("Test", nbt.getInteger("Test") + 1); entityplayer.sendChatToPlayer("" + nbt.getInteger("Test")); }
-
[Solved] Tile Entity returns wrong data to Block
You probably just need to implement: public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.data); }
-
Tile Entity Problem
You also need a packet handler. https://github.com/Draco18s/Artifacts/tree/master/draco18s/artifacts/network And set up your mod as a network mod: @NetworkMod(clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"GenericRandom"}, packetHandler = PacketHandlerClient.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = {"GenericRandom"}, packetHandler = PacketHandlerServer.class))
-
Tile Entity Problem
Client-server disparity. You'd want to look at this: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/entity/TileEntityDisplayPedestal.java
-
Using a mod's source
Put it inside /src/minecraft along side the rest of the source code.
-
Server side integer saving?
*Cough*
IPS spam blocked by CleanTalk.