Everything posted by Draco18s
-
[1.7] Encrypted Vanilla Code
i think i will Make sure that if you give a obfuscated function a better name include good Javadoc. Once you've renamed a function it's almost impossible for someone else to come along later and make the Javadoc better because in order to do so we have to rename the function. And MCBot will not let you rename a function that's already been renamed. Doesn't even matter that it's being renamed to the same thing.
-
red stone wire block
Are you actually making any of the changes I suggest? public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) || par1World.getBlockId(par2, par3 - 1, par4) == Block.glowStone.blockID; } IS NOT ALWAYS RETURNING TRUE.
-
[1.7.2] get int from tileentity
Even just 1 int? Yes. It screws with the save/load process. I don't know why, but it does.
-
[1.7.2] get int from tileentity
Do not pass references to a TileEntity's constructor. It messes up all of the things.
-
red stone wire block
CHANGE CIRCUITS public RedstoneConducter(int par1) { super(par1, Material.circuits); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F); } TO ROCK public RedstoneConducter(int par1) { super(par1, Material.rock); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F); } Seriously, Ctrl-F to find-in-file, just like every other application ever.
-
red stone wire block
Yes. Search -> Text -> Find in Workspace
-
[1.7.2] get int from tileentity
No, read and write is always called after construction.
-
red stone wire block
Fix canPlaceBlockAt to return true.
-
[1.7.2] get int from tileentity
That is NOT the same thing at all. read/write NBT methods are for SAVING AND LOADING DATA. Resetting data is not even close to the same thing.
-
red stone wire block
To make it pushable, change its material type from Circuits to Rock
-
[1.7.2] get int from tileentity
override readFromNBT and writeToNBT
-
Inventory progress bar not working
par2 / 100D is sufficient. (int / double = double)
-
Can't link en_US.lang to my mod
Please register your items in PreInit, not during class construction.
-
[1.7.2] get int from tileentity
class World implements IBlockAccess at some level (I just don't recall where).
-
[1.7.2] get int from tileentity
Gosh, these look frighteningly similar.
-
Stessed dad: Tried several mods, but all fail to run.
Minecraft is heavily version specific. It's getting less so, but it really depends on "what changed." From 1.6.2 to 1.6.4 there were only a handful of changes that didn't effect most mods, so it was left as a "try it" kind of state. Mods that did work didn't update, mods that didn't did (or didn't because reasons like the developer abandoning it). The only want to know for sure is to try it, if it doesn't work then you'd need to get the right version...if it exists. (For example, Invasion Mod did not update to 1.6.4, but does not work on 1.6.4, because it was abandoned (or at least, the dev has not made any posts in his own thread in like six months))
-
Infinite Code Looping error
My god. You're all a bunch of idiots. Don't click on the fucking ad, click on the skip ad button! IT'S A FUCKING AD, OF COURSE IT ISN'T GOING TO GIVE YOU THE RIGHT FILE.
-
[1.7.2] Making an ore why do i get an error?
Because IDs aren't used any more. Not having dug into 1.7 yet myself all I know is that you're doing it wrong. Check vanilla ores like diamond or coal.
-
[1.7.2] change block color with tick.
createTileEntity != onUpdate createTileEntity is called once when the block is placed or the world is loaded. After that you should be using the TE's onUpdate function.
-
[1.7.2] change block color with tick.
Blocks only have one type of data that sticks around: metadata. Either change the metadata every tick and convert that into a color in colorMultiplier or use a TileEntity.
-
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.
IPS spam blocked by CleanTalk.