Everything posted by Draco18s
-
Can't link en_US.lang to my mod
...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.
-
[1.6.4] Cooldowns
Use NBT data. Set an integer to 1200 and then onUpdate subtract 1 from it. Timers will keep running while Minecraft is paused.
-
[1.7.2] Make a block drop metadata items
There's another function called damageDropped or similar.
-
[1.6.2]Clear cube-shaped area in world
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.
-
Making a Block Spawn Void Particles (Or Any Particle)
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.
-
Making a Block Spawn Void Particles (Or Any Particle)
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.
-
Making a Block Spawn Void Particles (Or Any Particle)
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.
-
[1.7.2] - [Solved] Lightning always spawning underneath the player
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.
-
Rendering a 3D item as a throwable item
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.
-
Stessed dad: Tried several mods, but all fail to run.
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
-
Rendering a 3D item as a throwable item
...You really shouldn't do that in the proxy class. That needs to run both client and server side.
-
[1.7.2] world.destroyBlock not working [Solved]
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.
-
[1.7.2] world.destroyBlock not working [Solved]
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.
-
[1.6.4][SOLVED]How to make an Item effective only against a certain block
if(par2Block == Blocks.obsidian) ? Seriously dude, basic Java.
-
[1.7.2] world.destroyBlock not working [Solved]
Tangentially related: How many of these reasonably common functions are still obfuscated at this point?
-
[1.7.2] Texture in exported mod
...
-
[1.6.4][SOLVED]How to make an Item effective only against a certain block
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)
-
"A mod tried to open a gui on the server without being a NetworkMod" error
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)) ?
-
[1.7.2][UNSOLVED] - Making vanilla tools incapable of breaking custom block
public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5){ } ?
-
Configure GameType
config = event.getSuggestedConfigurationFile(); whateverval = config.get("MyCategory","MyNamedValue").getInt();
-
Forge for minecraft 1.7.4
It's almost like people are incapable of reading and looking at existing thread titles.
-
[1.7.2] NullPointerException: Rendering item
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() ?!
-
[Solved]How to set to a Config file?
There are three kinds of programming errors: Off-by-one errors and bad reference errors.
-
[1.6.4] Avoiding Subtypes?
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.
-
[1.6.4] Check for a Tile Entity and sending data between them.
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.
IPS spam blocked by CleanTalk.