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. ...What? Remove the spaces? I understand removing the spacing BEFORE the equals, but you're actually supposed to have spacing AFTER the equals, unless you want an item named "EnergyCell". He means: item.EnergyCell.name = Energy Cell ^ ^ Those equal signs.
  2. Use NBT data. Set an integer to 1200 and then onUpdate subtract 1 from it. Timers will keep running while Minecraft is paused.
  3. There's another function called damageDropped or similar.
  4. for(x=-3;x<=3;x++) { for(y=-3;y<=3;y++) { for(y=-3;y<=3;y++) { world.setblock(x,y,z); } } } Seriously, this is basic java.
  5. If you do move to your own particles, you'll want this: public class ParticleUtils { static Map<String, ResourceLocation> boundTextures = new HashMap(); public static void bindTexture(String texture) { ResourceLocation rl = null; if (boundTextures.containsKey(texture)) rl = (ResourceLocation)boundTextures.get(texture); else { rl = new ResourceLocation("MODID", texture); } Minecraft.getMinecraft().renderEngine.bindTexture(rl); } public static ResourceLocation getParticleTexture() { try { return (ResourceLocation)ReflectionHelper.getPrivateValue(EffectRenderer.class, null, new String[] { "particleTextures", "b", "field_110737_b" }); } catch (Exception e) { } return null; } } That will let you switch textures without buggering anything. Call the first function to change to your texture (the code there just caches the resource location so it doesn't have to make new file references all the time) and then call the second function when you're done rendering your particles to reset the texture back to Minecraft's vanilla particle sheet.
  6. Yes, yes they are. And adding new types is a right pain, because if you don't change the texture right and change it back everything just falls apart.
  7. Particles. Are a b*tch if you want them to look like something that Minecraft doesn't have. Fortunately for you, the void particle exists and is what you want. I forget what class Minecraft uses where it figures out what string matches what particle (FX[something something]?) but you can find it by just tracing through existing code (hover over a function and you'll get the Javadoc, click the green dot in the upper left corner or the name of the function to jump to that point in the code). It's only four jumps through a couple of vanilla classes (start with world.spawnParticle). Once you find the name you're looking for (I know that redstone is "reddust" for instance) you can just use that instead of "flame" when calling spawnParticle.
  8. Take a look at how I do it here. Class is kind of a mess, but you're looking for packet ID 5 (ctrl-f "case 5") there's also a comment that says "lightning" It's not the greatest thing in the world, but it might help you.
  9. Or you could do it during Init / Post Init like a normal person. There's basically no reason to shove things into the common proxy.
  10. forge-1.6.4-9.11.1.965-installer.jar Mutant_Creatures_v1.3.6_mc1.6.2(1).zip 1.6.2 does not equal 1.6.4
  11. ...You really shouldn't do that in the proxy class. That needs to run both client and server side.
  12. It's likely less intense than I'm thinking, but I haven't been under a lot of pressure to do it, and have been working on other projects.
  13. Sounds like I can start tinkering then. The changes from 1.6 to 1.7 pretty much mean I have to learn everything all over again, and I wasn't willing to do that and hunt down every bloody undeobfuscated command at the same time. I've fallen out of doing mods lately (other than maintaining my one popular one) but I'll make sure to remember that 1.7 is pretty much usable at this point.
  14. if(par2Block == Blocks.obsidian) ? Seriously dude, basic Java.
  15. Tangentially related: How many of these reasonably common functions are still obfuscated at this point?
  16. Might want to start with a number greater than 1. If its too slow, make the number bigger. If its too fast, make the number smaller. (Note: bare-handed strength is approximately 0.25)
  17. Do you have @NetworkMod(clientSideRequired = true, serverSideRequired = false) Or do you have @NetworkMod(clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"MyMod"}, packetHandler = PacketHandlerClient.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = {"MyMod"}, packetHandler = PacketHandlerServer.class)) ?
  18. public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5){ } ?
  19. config = event.getSuggestedConfigurationFile(); whateverval = config.get("MyCategory","MyNamedValue").getInt();
  20. It's almost like people are incapable of reading and looking at existing thread titles.
  21. Without code we can't help you, although this is particularly puzzling: java.lang.NullPointerException: Rendering item at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:266) NPE at getItemDamage() ?!
  22. There are three kinds of programming errors: Off-by-one errors and bad reference errors.
  23. The item you'd want to use metadata (as NBT data items will never stack). For the crop you're going to have to use a tile entity rather than a standard block, as metadata is already being used for growth stage.
  24. All I did was correct an error he'd already made. You have to make sure you're retrieving the right TE. How you go about getting/saving references is up to you.

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.