-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
[Half-Solved]1.6.4 Forge OBJ Block Texture, and Not Solid
Draco18s replied to SuperHB's topic in Modder Support
Yes. If you know a little programming. -
[Half-Solved]1.6.4 Forge OBJ Block Texture, and Not Solid
Draco18s replied to SuperHB's topic in Modder Support
They have fake blocks providing the colliders. When any one of the blocks involved in the multi-tile object are broken, they're all broken. -
Bats already spawn only in caves. It's called world.canBlockSeeSky()
-
TileHandheldFurnace tilehandheld = new TileHandheldFurnace(); Uh. You're going to want to approach this differently.
-
I am surprised that didn't crash. You are not using the method correctly. I think he got lucky.
-
Don't use variables like that. Just pass them to the function like you did with the world object...
-
[1.7.2]Find Player's spawn point instead of the global one
Draco18s replied to spda's topic in Modder Support
"C:\Users\MyUser\Desktop\Forge Development Environment\src\minecraft\assets\mymod\textures\items" is the correct path, assyming "mymod" is your Mod ID and that you're workspace is at "C:\Users\MyUser\Desktop\Forge Development Environment\" -
Can I have the game detect if a player just spawned?
Draco18s replied to MINERGUY67880's topic in Modder Support
-
Go to mcp/conf and open up methods.csv That will tell you the human-readable name of every func_* fields.csv will do the same for variables.
-
Its the for loop. Eclipse doesn't like for(type var : array) type loops. You'll have to change it to a regular loop. The code is technically valid, Eclipse just doesn't like it (it's a decompile-is-not-perfect issue).
-
Decompiling is not a perfect science. If you know what the errors are and know what you're trying to do, you can usually solve the problem.
-
[me=Draco18s]facepalms.[/me]
-
[1.6.4] Including an API that may not exist on the server
Draco18s replied to lexwebb's topic in Modder Support
Right. APIs do not have their own mod ID. They're simply a package that is part of a mod that is distributed as source code. You don't even need to include the compiled API when you distribute if you do things right. -
[1.6.4] Including an API that may not exist on the server
Draco18s replied to lexwebb's topic in Modder Support
1) Check to see if buildcraft is active first. There's a Forge method for this, I keep forgetting what it's called. (Reflection can do the same thing, here's one I use because I keep forgetting said Forge method: try { Class.forName("com.xcompwiz.mystcraft.api.MystObjects"); } catch(ClassNotFoundException e) { return; } 2) Check to see that the API has instanciated its values. Eg. here's what do if(MystObjects.book_lectern != null) { ... } 3) Once both of these pass, then access the API and do API related calls. -
[1.7.2]Find Player's spawn point instead of the global one
Draco18s replied to spda's topic in Modder Support
Any square texture works although you're encouraged to use 16x16 or some multiple thereof. -
[1.6.4] How would I dynamically change tool speed?
Draco18s replied to osum4est's topic in Modder Support
@Override public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { } ? -
Override getCanSpawnHere() You can access the world with the entity's worldObj, posX, posY, and posZ (even though it hasn't spawned yet) and check to see if any more of your mob are in the area, and if so, return false.
-
[1.7.2]Find Player's spawn point instead of the global one
Draco18s replied to spda's topic in Modder Support
Or leave that function out entirely. -
[1.6.4] Can I change vanilla Minecraft files?
Draco18s replied to NNJAWarfare's topic in Modder Support
Pre-gradle you can modify the base classes to your heart's content without ASM. -
[1.6.4] Can I change vanilla Minecraft files?
Draco18s replied to NNJAWarfare's topic in Modder Support
Note: ASM is superadvanged Java and requires an intimate knowledge of compiled Java bytecode. -
Be sure that if you're submitting renames to include Javadoc. Also helpful if you know how to properly format javadoc, too. Example: /** * Returns an Image object that can then be painted on the screen. * The url argument must specify an absolute {@link URL}. The name * argument is a specifier that is relative to the url argument. * <p> * This method always returns immediately, whether or not the * image exists. When this applet attempts to draw the image on * the screen, the data will be loaded. The graphics primitives * that draw the image will incrementally paint on the screen. * * @param url an absolute URL giving the base location of the image * @param name the location of the image, relative to the url argument * @return the image at the specified URL * @see {@link Image} */ public Image getImage(URL url, String name) { try { return getImage(new URL(url, name)); } catch (MalformedURLException e) { return null; } } http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html Basically, include a short description (most HTML valid as markup, though you shouldn't need it) and a list of the parameters. The {link} ability is really really nifty, though not necessary. I've done some advanced Javadoc'ing with my API over here if you want some more examples.
-
When the helmet comes off, the player can only do one of two things with it: a) add it to their regular inventory b) drop it on the ground If they add it to their regular inventory, the item will receive an onUpdate call every tick. If they drop it on the ground, the item will receive an onEntityItemUpdate call every tick (or so; I have a vague recollection that it was more like once every 4, but you only need a once-off so it doesn't matter).
-
[Half-Solved]1.6.4 Forge OBJ Block Texture, and Not Solid
Draco18s replied to SuperHB's topic in Modder Support
Screenshot