-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
ModLoader.registerEntityID(MobTest.class, "TestMob", 50); ModLoader.addSpawn("TestMob", 15, -5, 1, EnumCreatureType.creature); ModLoader.addLocalization("enity.TestMob.name", "Test Mob"); Any reason you're not using the native Forge calls?
-
Forge automatically assigning Block and Item ID's
Draco18s replied to endershadow's topic in Suggestions
This sounds like a total mess. -
Your issues is within this line, lets see if you can find it. I have a working mcmod.info file open in front of me, just to compare, because I couldn't see an issue with that line. And I still can't. "authors": [ "XCompWiz" ],
-
Help with modding Nether Warts and Gunpowder
Draco18s replied to minecraftdotjarrr's topic in Modder Support
Thread title needs to be more informative. -
Just as a warning: Make sure this plays nice with Mystcraft. Mystcraft and Secret Rooms had a conflict for a while, because Secret Rooms used a FakeWorld object and there were some things assumed about it (by one mod or the other) that were untrue and caused null pointer exceptions. (I think Mystcraft kept trying to cause lightning in the fakeworld because it was unable to tell that it was fake, but the fakeworld had no lightning functions, but I could be wrong)
-
Forge automatically assigning Block and Item ID's
Draco18s replied to endershadow's topic in Suggestions
The problem is that it gets messy when you start trying to handle multiplayer. How do you insure that every client has their mods load in the same order so that IDs (behind the "Forge-wall") match up? -
How do you make a block emit a strong redstone signal?
Draco18s replied to tlr38usd's topic in Modder Support
*Opens Block.java* *Hits ctr-F* *Types in "strong"* *Hits enter* /** * Returns true if the block is emitting direct/strong redstone power on the specified side. Args: World, X, Y, Z, * side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block. */ public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { return 0; } -
Probably a stupid question, but function for getting a player's username.
Draco18s replied to Cyan's topic in Modder Support
I don't post code that works because 99% of the time I'm not opening Eclipse and nabbing exact function names. I do, however, post code that tells people where to look. Forums are an asynchronous method of communication. Therefor you can afford the time to spellcheck and make sure you've got things write.* About a third of my own questions are solved before I even make my opening post because in the process of copy-pasting and explaining what's going on I realize my error. Which is impossible to know from this end, therefor it is acceptable to point out these errors. This post is not a criticism, it is for future reference. *Even go back and make edits. This word should be "right" but I have a bad habit of typing the wrong thing and will frequently alter my posts when I notice errors just after clicking submit. -
[SOLVED][SLOTS][1.5.1] limitations to only accept blocks
Draco18s replied to rasmustof's topic in Modder Support
Use: @Override public boolean isItemvalid(ItemStack par1ItemStack) { if(par1ItemStack !=null) { if(par1ItemStack.getItem() instanceof Block) { return true; } } return false; } -
[SOLVED][SLOTS][1.5.1] limitations to only accept blocks
Draco18s replied to rasmustof's topic in Modder Support
If Block.blocksList[stack.getItem().itemID] is returning null, that means that the item is not a block, ergo if its not null it must be a block. Ergo allow it (return true). Actually, I feel like this would give array out of bounds errors if you were looking at an item. The blocksList array only has 4096 spaces and item id's go far higher than that, so wouldn't that end up giving you out of bound errors if it isn't a block? Probably, but you could check for it. (i.e. && getItem().itemID < 4096...) -
[SOLVED][SLOTS][1.5.1] limitations to only accept blocks
Draco18s replied to rasmustof's topic in Modder Support
If Block.blocksList[stack.getItem().itemID] is returning null, that means that the item is not a block, ergo if its not null it must be a block. Ergo allow it (return true). -
Yes, its the decimal representation of a hexadecimal RRGGBB value. par1/2/3 are the x/y/z coords of the specific block And yes, you can use this function on any block you create (or base class edit existing blocks).
-
Generally where you do your other GameRegistry, LanguageRegistry, and EntityRegistry stuff.
-
Probably a stupid question, but function for getting a player's username.
Draco18s replied to Cyan's topic in Modder Support
Not to mention that his code should have been throwing errors... -
EntityRegistry.registerModEntity(EntityTractor.class,"entityTractor",0,this,256,1,true); and RenderingRegistry.registerEntityRenderingHandler(EntityTractor.class,new RenderTractor());
-
public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { return 16777215; //change this }
-
Define "not working."
-
This is wrong: "dependencies": [Minecraft forge 1.5.2-7.8.0.725 +] Needs to be: "dependencies": ["Forge"] Two things: 1) You didn't put quotes around it (see the Authors tag) 2) I don't think the MCmod.info file handles version of dependencies, especially not minimums, assuming that it uses what's there at all.
-
field_94394_cP is just a not-deobfuscated class variable. In this case it is an array index. If you're looking at leaves, I believe that field holds a reference to whether or not Minecraft is in fancy rendering (transparent leaves) or fast rendering (opaque leaves).
-
Adding a skill (stat similar to experience and health)
Draco18s replied to big_AL97's topic in Modder Support
You actually can't be that dangerous with Java. MySQL on the other hand... -
What does this mean?
-
Adding a skill (stat similar to experience and health)
Draco18s replied to big_AL97's topic in Modder Support
You need to figure out when you need to reference this data value and figure out where you can get a reference to the player. Forge Events are probably the best solution. -
[SOLVED][SLOTS][1.5.1] limitations to only accept blocks
Draco18s replied to rasmustof's topic in Modder Support
Or @Override public boolean isItemvalid(ItemStack par1ItemStack) { if(par1ItemStack !=null) { if(par1ItemStack.getItem() instanceof Block) { return true; } return false; } } -
Adding a skill (stat similar to experience and health)
Draco18s replied to big_AL97's topic in Modder Support
I'm pretty sure this would crash,since you are referencing to a non instanciated object... Obviously. I was merely declaring the object so that the OP knew what type it was. The proper way would be: [code] EntityPlayer player = Minecraft.getMinecraft().thePlayer; NBTTagCompound nbt = player.getEntityData(); Also,@OP: I think you misunderstood the use of NBT Data.This simply returns a list of informations stored in nbt.You have to use nbt.setInteger/setByte/etc... to save them. That won't work for SMP.