-
Content Count
14019 -
Joined
-
Last visited
-
Days Won
103
Content Type
Profiles
Forums
Calendar
Everything posted by Draco18s
-
That, I believe, is not something that can be done through Forge.
-
[SOLVED] Overriding/Extending an Already Existing Block
Draco18s replied to Cannash's topic in Modder Support
It's still a new block (just as if you'd extended Block) so all the usual things apply. But really, that's it. Any functions you want to "remove" you need to create a new one (even if blank) and use the @Override annotation (which you should be doing anyway). -
[SOLVED] Overriding/Extending an Already Existing Block
Draco18s replied to Cannash's topic in Modder Support
It's still a new block (just as if you'd extended Block) so all the usual things apply. But really, that's it. Any functions you want to "remove" you need to create a new one (even if blank) and use the @Override annotation (which you should be doing anyway). -
[SOLVED] Overriding/Extending an Already Existing Block
Draco18s replied to Cannash's topic in Modder Support
public class MyBlock extends VanillaBlock { //code } -
[SOLVED] Overriding/Extending an Already Existing Block
Draco18s replied to Cannash's topic in Modder Support
public class MyBlock extends VanillaBlock { //code } -
Got any links? Never heard of Tesselators, and google didn't help much either. I'm not sure what it is, exactly, but I know what it does. It draws quads (4-sided polygons in 3D space). Example: tessellator.addVertexWithUV(minX, theY, maxZ, minU, maxV); tessellator.addVertexWithUV(minX, theY, minZ, minU, minV); tessellator.addVertexWithUV(maxX, theY, minZ, maxU, minV); tessellator.addVertexWithUV(maxX, theY, maxZ, maxU, maxV); Draws a single plane on the X/Z plane (i.e. the top of a block). Flipping the points around (reverse order) will render it upside down (i.e. bottom of a block). Not sure what the orientation is of those four lines offhand, though. I think it's the underside, based off a comment in the code referencing the "bottom of the bed" where I got it from.
-
Tesselators aren't that bad either. 4 corners of 3D space and some texture UV coordinates and you're golden.
-
It has come to my attention that no one knows about the following link: https://github.com/MinecraftForge/FML/wiki/FML-mod-information-file You're welcome
-
Unrelated, but worth pointing out: public static final Block greenGlass = new BlockStainedGlass(919).setUnlocalizedName("glassGreen").setHardness(0.3F).setCreativeTab(CreativeTabs.tabDecorations).setStepSound(Block.soundGlassFootstep); Ew. You're not using a config file for your block and item IDs! Also, all those function calls to set names, hardness, and so on, I'd put those inside the class file, except where needed to override (eg. all your stained glass has the same hardness, so put that IN the class BlockStainedGlass, but they have different names, so keep that outside).
-
What function gets called when you schedule an update? Maybe....use that function to...schedule an update?
-
world.scheduleBlockUpdate(x, y, z, blockID, delayTicks)
-
Look at the renderType. Some vanilla items do this.
-
Scala is a programming language. I have no idea if that's even possible.
-
You can also go to the function definition itself and see what it does.
-
overriding a method in EntityRenderer
Draco18s replied to AzureusNation123's topic in Modder Support
You're not extending a class for super to be of any use. Or overrides. -
overriding a method in EntityRenderer
Draco18s replied to AzureusNation123's topic in Modder Support
And what were the errors? -
The whole texture stealing thing I didn't see myself until I went to steal some of the code from the grass block to make a block that camouflaged itself as grass. Hehe.
-
overriding a method in EntityRenderer
Draco18s replied to AzureusNation123's topic in Modder Support
@Override public void render(...) { //your code super.render(...); } -
1.5 uses the IconRegister system, not a file reference system. If you want to use "the texture BlockX is using" then you want to reference that block directly, for example: this.blockTexture = Block.sponge.getTextureFromSide(0); Grass does this to get its bottom face, by borrowing dirt's texture (the number passed is the side; 0 is the bottom, 1 is the top, 2-4 are the sides). If you want the texture BlockX would use but make a copy of it (for whatever reason) then you need to register it, e.g. iconRegister.registerIcon("sponge"); This is how the vanilla sponge registers its texture. All vanilla blocks use their unlocalized block name as the string to register their icons.
-
After reobfuscating, open the folder /reobf then open the folder /minecraft then zip the folder myname into a zip file (myname.zip) and preserve folder structure. That should cause it to load just fine (you'll have to add your textures manually, the /mod folder from /src if you're using 1.5+). I have a sneaking suspicion that you're zipping the java files not the class files (I did that the other day, to much confusion).
-
http://www.minecraftforge.net/wiki/Icons_and_Textures#Item_and_Block_Textures
-
you did but either you deleted your own post or a moderator did I didn't delete it. No idea why a mod would have, either. It was basically a copy-past of the OP's code with that one change.
-
That will require an entity of some kind. And probably a model to go with it. And that requires things I don't even know about (haven't touched mob or GUI code yet).
-
I could have sworn I replied to this thread, along the lines of... private static final String[] colors = new String[16]; //INITIALIZE ME FIRST Ah well.
-
Me either, I've even used it with a custom damage source. playerEntity.attackEntityFrom(new ColdDamage(), 1); For vanilla damage types: playerEntity.attackEntityFrom(Damage.generic, 2); (This is, of course, attacking the player, for other entities, you need a reference to that entity).