Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. 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.
  2. 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.
  3. 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:
  4. 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); }
  5. Mmmm, static. <3 (I love scope. This is the fourth thread in the last two days that has had the same problem.)
  6. 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.
  7. 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.
  8. registerIcons is run once when the game loads, you're in the wrong function.
  9. Mmmmm~ Static properties. <3
  10. 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.).
  11. 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.
  12. 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.
  13. 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?).
  14. Gradle questions should be posted in the Gradle subforum.
  15. ...GameRegistry...? Also, I have no idea what version of Minecraft you're targeting.
  16. 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.
  17. 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...
  18. 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.
  19. public class indestructibleTools { public static indestructibleTools instance; Where's the @Instance annotation?
  20. 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.
  21. That's because you need a player reference. The method is not static.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.