Everything posted by Mazetar
-
Help adding a speed boost when in water
Maybe the beacon block could give some insight, it gives a speed boost?
-
Getting all instances of a block to do something?
Hmm but how many blocks of this type will there ever be inn the world? if it's radios I guess there wont be so many hundreds of them? Inn that case you could make them add their positions to a Vec3 list when added/placed? then you can loop trough that list whenever you need to find radios and then you only loop trough the worlds radios?
-
Getting all instances of a block to do something?
Block Container is what makes the TileEntity work! But you don't need to do that, you just need to implement/override the TE related methods. I can't remember all their names in my head at the moment but they are something like CreateNewTileEntity (returns the new tileEntity). HasTileEntity(returns true if it has one). Also I'm not sure but you may have to just create you're own TE upon placing and adding the block to the world if the above isn't enough
-
Entity texture not loading
hmm weird, what forge version do you have?
-
[Solved!] Problems with mod (Ore Generation, error at startup)
didn't see any. just wanted to make sure you paid attention to that little but important detail
-
Entity texture not loading
If you have a seperate project you may need to add the assets folder to the bin folder of that project, I had to do so for mine so i have eclipse/ProjectNameHere/bin/assets/...
-
[Solved!] Problems with mod (Ore Generation, error at startup)
There's some setting somewhere to get it as a popup somehow, don't know where but you could find it somewhere under settings I think Anyways yeah, it's awesome with those "OH NICE!!!" moments when you realize something cool and you can just implement it and you're life is 10x easier and you're code looks so much neater Oh PRO TIP: Use good variable and method names, don't call stuff asdk and someMethod() even if you remember it yourself that way. Someday you will want help and then the code better be readable Also once you may want to work with someone and then it's kind of a must as well
-
Entity texture not loading
The correct path is Do NOT include .png!
-
[Solved!] Problems with mod (Ore Generation, error at startup)
that's weird, you must have touched it by an accident Anyways you see how many easy ways there are to do things once you learn more programming, so I do again recommend that you take some time to do that. But I do understand that coding is more doing progress and that's more fun PS: Check you're PM box
-
[1.6.2] NoSuchMethod net.minecraft.client.Minecraft.main
No clue, I'd myself would have downloaded and re-installed a new forge build and guess whatever I fucked up was either something I wont do twice or that it was something wrong with the build and try again
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Well it was all from memory but all the things inn there should be inside the other blocks you made so with a few changes one of them would do
-
[Solved!] Problems with mod (Ore Generation, error at startup)
it could just be something like this: public class MyBlockNameHere extends Block String TextureLocation; public MyBlockNameHere (int ID, String texture) { super(ID); TextureLocation = texture; } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon(modID +":" + TextureLocation ); } Something along those lines should work fine
-
[1.6.2] NoSuchMethod net.minecraft.client.Minecraft.main
*steals screenshot from some other tutorial on a somewhat different setup* Like this I mean: http://i.imgur.com/Apr3H34.png
-
[1.6.2] NoSuchMethod net.minecraft.client.Minecraft.main
Change you're run configurations to this instead of Start or main or whatever it was earlier: net.minecraft.launchwrapper.Launch
-
Get the nearest hostile mob
Then use the same principle just around the block instead of a player then?
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Not sure about the last question, but for the first one I did not mean new MyBlock1 and new MyBlock2 I said "new MyBlock(ID, "texture")" for both of them, reusing the class.
-
[1.6.2] [Solved] Fluid system
Some container item to pick it up with? you can check the files for that one and the block files etc. There are reference files for the Tank and Containers as well
-
Get the nearest hostile mob
That's probably the most efficient answer! It's the one I would have used, so try it and thank the man
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Yes you could that, but you could also just do this: Block block1 = (new MyBlock(671, "textureName")).setHardness(1F).SetName("First Block"); Block block2 = new MyBlock(672, "textureName"); and just set the texture inside the constructor and reg it as usual in the reg method. Or you could if you name the block the same as the png, just use the blockname instead when you reg it and then just change the ID and .setName between blocks.
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Anyways this all hopefully just proved to you how much time you can save by learning JAVA properly before you start on that large portion of you're mod.
-
[Solved!] Problems with mod (Ore Generation, error at startup)
It's not a minecraft principle it's an programming principle. I normally don't do this but since you have shown you are willing to learn, i'll do it public class Animal { String Type; String Name; public Animal(string type, String name) { Name = name; Type = type; } public void SayHello() { Console.PrintLine("Hello I'm a " + type + " and my name is " + name + "!"); } if you create two Animals this: [code] Animal animal1 = new Animal("Dog", "Albert"); Animal animal2 = new Animal("Cat", "Daisy"); animal1.SayHello(); animal2.SayHello(); this would result in the following output:
-
[Solved!] Problems with mod (Ore Generation, error at startup)
not sure exactly what you did but glad it all works as you wanted it I guess you figured out how to add functionally equal blocks/items by reusing the same class with different parameters/setMethodParameters? I'm really happy you got here and read that before you started working then Edit: I tought only some of them was blocks and some where other stuff, just a guess at the numbers mate nothing else
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Let me see if I can make you're life a bit easier.. 50 classes you say? is that by any chance like 20-30 new blocks which all just have different textures, names, id and drops? Then you can do that in 20-30 lines instead of 20-30 block classes, just so you know
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Looking into the code again I can't see why you would need that event manager thing, I'm pretty sure you can just remove it as it's not doing ANYTHING as far as I can tell If it's needed we can handle that afterwards
-
[Solved!] Problems with mod (Ore Generation, error at startup)
I'm pretty sure (as in 110% sure!) that the mentioned event manager you linked is NOT the one intended. A random class called event manager will probably NOT do what you intend it to So don't bother!
IPS spam blocked by CleanTalk.