-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
You don't call the function yourself, Forge calls it for you. You need to add the class with that function in it to the Forge event bus.
-
Arrows have fixed damage. You have to find the part where the arrow is created and modify its damage there. For a block I made that acted like a dispenser, I wanted to increase the damage from arrows, ended up with this: [cope] EntityArrow entityarrow = new EntityArrow(par1World, par2IPosition.getX(), par2IPosition.getY(), par2IPosition.getZ()); entityarrow.canBePickedUp = 1; entityarrow.setDamage(6); ItemBow should have a function that handles the creation of the arrow and adding it to the world, just override that function and apply the damage you want.
-
[Solved]NBTTagCompound editing all smp players
Draco18s replied to MyOwnHarem's topic in Modder Support
You have static properties. private static EntityPlayer player; private static int miningXP; If you don't know why I'm telling you this, you don't have a basic grasp of Java (or any programming language, to be blunt) and that is a base requirement of getting help on this board: -
No no. You don't need to packethandle this yourself. You need this: public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); //this packet already handles the problem you have. return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.data); }
-
Mmmm, static. <3 (I love scope. This is the fourth thread in the last two days that has had the same problem.)
-
Just FYI: setHardness doesn't actually effect which pickaxe you can mine a block with. You can set the hardness to 400 and leave it at canBeHarvested by wood and you will be able to harvest it with wood.....eventually.
-
This probably isn't related, but you have a typo here: if (energyStored >= 0 && energyStored <= 100) { //what happens at 200? worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 3); } As to your issue: Client-server disparity. You need to implement getDescriptionPacket (if I am recalling the method name correctly) and onPacketData. What's happening is that your server-side tile entity is changing the block metadata to not-zero and the client sided tile entity is changing it back....because it doesn't have the correct energy values! This is why it flickers any time it changes from 10% to 20% or back: changing the metadata to what it already is doesn't send an update packet.
-
[1.6.4] How to change an item texture according to the player's armor?
Draco18s replied to luan's topic in Modder Support
registerIcons is run once when the game loads, you're in the wrong function. -
[Solved]NBTTagCompound editing all smp players
Draco18s replied to MyOwnHarem's topic in Modder Support
Mmmmm~ Static properties. <3 -
Do whatever you want. No one's going to see it. The only standards I can think of come to how you name your items/blocks ("modname.[item|block|entity]name") but that's more for "convenience of inter-mod compatibility" than anything (ie. ingots, ores, dusts, gems, etc.).
-
[1.7.2] [Solved] How to override/remove vanilla recipes
Draco18s replied to SackCastellon's topic in Modder Support
is.getItem() == Items.lead ? -
Thread title: "Help Needed!" Me: "And I have no idea what they're doing, what version of Minecraft, so I'm just going to ignore it." Per your question: Probably can't.
-
[solved posted answer in thread]Texture overlay?
Draco18s replied to PeterRDevries's topic in Modder Support
https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifact.java Look at getIcon() and requiresMultipleRenderPasses(). I'm pulling data from an NBT to determine which icon, but the basic method is there. -
Don't overdo it man, this is not a gradle question Things have changed violently enough with the move to Gradle that I almost feel like we should have a 1.7 subforum. People asking vague questions and not posting what version they're using is only going to lead people to supplying bad answers, which is why I've been trying to direct all 1.7 questions into the Gradle subforum. The only people who have those answers are likely reading that board. Examples have been like "where do textures go now?" with no version information. That question is just as valid for 1.5 as it is to 1.7 based on when the asker was last modding (did they drop out and recently come back and pick up 1.6.4 or did they just migrate from 1.6.4 to 1.7?).
-
Gradle questions should be posted in the Gradle subforum.
-
...GameRegistry...? Also, I have no idea what version of Minecraft you're targeting.
-
[solved posted answer in thread]Texture overlay?
Draco18s replied to PeterRDevries's topic in Modder Support
Leather armor renders two textures. The first one is the colored part, the second one is an overlay to put back the "still supposed to be brown" parts. You can do it with any armor texture you'd like, if you set up your armor class the right way. Now then, what texture object are you trying to mess with, all of them are handled differently. -
It might be muted by default. I know the Forge team can tweak settings (there's a pre-supplied mutliplayer server listing, for example). I don't run with headphones on in my dev environ 99% of the time anyway, so...
-
public class indestructibleTools { public static indestructibleTools instance; Your variable, here, instance is going to be null, forever. You aren't setting it and Forge can't find it because you didn't put @Instance above it. So when you try and pass it to the openGUI function, it vomits a null reference error at you because the variable you passed was null. Even following a tutorial you should have gotten the annotation. You really ought to go learn a little more Java.
-
Bingo.
-
public class indestructibleTools { public static indestructibleTools instance; Where's the @Instance annotation?
-
public void renderBlockWire(TileEntityWire tl, World world, int i, int j, int k, Block block) { model = new ModelEnergyWire(); That's why. You're not bothering to save the model between frames. You're making a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a ne--error: post too long.
-
Getting a players skin and using it in a resource location
Draco18s replied to TrollTaylor's topic in Modder Support
That's because you need a player reference. The method is not static. -
[SOLVED] [1.5.2.] Custom Mobs /w Custom Sounds.
Draco18s replied to DoorCloser's topic in Modder Support
Its an event handler class. -
[SOLVED] [1.5.2.] Custom Mobs /w Custom Sounds.
Draco18s replied to DoorCloser's topic in Modder Support