-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
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).
-
[SOLVED] Is it possible to check the biome when placing a block?
Draco18s replied to LutzBlox's topic in Modder Support
Eclipse is probably by far the best IDE I've ever used. Automatic detection of unrecognized classes? Quick resolution of common errors? Easy access to methods and properties of other classes through mouse-over modal windows? GAWD DAMN. I'm going to see if I can use it to develop for Unity here pretty soon (MonoDevelop for Windows that ships with Unity has several game-breaking bugs so I'm using Notepad++). -
Given that this thread is only a few months old, I figured I'd ask my question here. What is the update url and how do I use it. That is, what is it that goes at the specified URL so that updates can be detected?
-
[SOLVED]My textures need to be in the minecraft.jar?
Draco18s replied to Ellbelly's topic in Modder Support
because that's not how you package things. This is wrong: /.minecraft/mods/MyMod/minecraft/OresMod |_ |_ It should be like this: /.minecraft/mods/MyMod.zip |_ /OresMod |_ /client /common /mods/textures |_ /blcoks /items /armors -
[SOLVED]My textures need to be in the minecraft.jar?
Draco18s replied to Ellbelly's topic in Modder Support
Textures do not need to go in the jar, they just need to be inside a folder called 'mods' which is zipped up alongside your classes. E.g. if your main package is "ellbelly.main" and you register your textures as "ellbelly:myblock" then your zip will contain these folders: /ellbelly (contains /main, which contains your class files and other packages) /mods/ellbelly/textures/blocks (contains a png file named 'myblock.png') The compiler will not move the textures folder from the /src directory to /reobf when you compile, you will have to copy it manually (I tend to make a zip of my classes, move it out of the /reobf folder, then add the textures to that zip, and new compiles just get the new classes added, overwriting the old ones). See: http://www.minecraftforge.net/wiki/Icons_and_Textures#Item_and_Block_Textures (Note: for that project I'm referencing the textures directly, not using the icon register, as the moon isn't part of that icon register thingy, but I set up my folders the same way to stay organized) -
Probably. Alpha z-sorting is a bitch. Which is why there are render passes, but it means that certain things don't render behind certain other things (like water behind ice, etc.) because without them, things go all screwy. In googling for an image to use an example, the first result was from a thread I posted on the Unity forums about this very issue.
-
That makes more sense.
-
This makes no sense. if(X) { Y } else { Y }
-
Making block harvest-able only with enchantment
Draco18s replied to Briggybros's topic in Modder Support
All I can say at this point is: Add debug statements, figure out where the program is going that it shouldn't be and why. -
This thread (and a request) inspired me to do this. Even though I didn't use the code here, thanks!
-
[SOLVED] Is it possible to check the biome when placing a block?
Draco18s replied to LutzBlox's topic in Modder Support
Anyway, yeah. Take advantage of code hinting. I scroll through the list of properties and methods for various classes all the time. It's how I know that you can't get the current (surface) sunlight level directly, but you CAN get the amount that has been subtracted from it due to dusk/night, which is close enough. -
http://imgs.xkcd.com/comics/wisdom_of_the_ancients.png[/img] Averted.
-
Making block harvest-able only with enchantment
Draco18s replied to Briggybros's topic in Modder Support
@Override public int quantityDropped(int meta, int fortune, Random random) { return 0; } -
Abstract state machines
-
[SOLVED] Is it possible to check the biome when placing a block?
Draco18s replied to LutzBlox's topic in Modder Support
@Just idk if he is using n++ ? ...Eclipse is free... And a compiler... -
Not that I'm aware of. The solution I came to when I used it was to just force-update similar blocks on adjacent sides. (My block became non-solid when walked on, so when walked on, it and all of it's like neighbors turned non-solid). The...other solution I used for a different project was to make the block bounds ever so slightly less than a full cube, and use the onCollission method.
-
I would not be surprised if they hacked in a third render pass.
-
[SOLVED] Is it possible to check the biome when placing a block?
Draco18s replied to LutzBlox's topic in Modder Support
Remember to use your IDE's autocomplete capabilities. -
[SOLVED] Is it possible to check the biome when placing a block?
Draco18s replied to LutzBlox's topic in Modder Support
world.getBiomeGenForCoords(x, z) -
That's the one. But you also have to make your texture transparent.
-
Two bits: There's a renderType function, which returns either a 0 or a 1 (compare glass and ice). IIRC, blocks that use alpha return 0, and then have a partially transparent texture.
-
Just FYI, that function triggers about 3 blocks in 4 when walking, about 1 in 2 when running. It's not perfect.
-
Changing the TileEntity from inside the block it's attacht to
Draco18s replied to Abascus's topic in Modder Support
Added an avatar, that should help. -
How would I cause a similar screen effect as being on fire does, for a new damage source? I can't seem to find where in the class files that particular function happens.