EntityPlayer player = ModLoader.getMinecraftInstance().thePlayer;
There'll be another function to check for the presence of an item, but I don't know it; have a look at the InventoryPlayer function, perhaps. Then you'll have something like this:
if (player.getInventory.isItemInInventory(item)){
// Do something
}
When I get home I will look into that, I saw in the BaseMod file this getMinecraftInstance function but didnt know how to use it. Thank you very much, Im sure this will help me greatly!
Im having a little problem understand how to do this. I want to check my players inventory in my mod to check if it contains a specific item and it they have it, to do something. This is purely a test, I will change what the conditions are afterwards but for now this is what I am looking for.
If anyone knows how to do this, it would be a great help.
I know EntityPlayer and InventoryPlayer have the functions I need, but I cannot initialize them so that I can use them, please, if you can, help!
Basically have a GUI which lists the items in a image array however you please, then add a button handler to each image according to what it is and add the item to the inventory.
Hello everyone, I am sure there have been mods like this before but I would like to introduce you to my mod. This mod is rather basic but shows the fundamentals of modding in Minecraft. I chose to do this mod to become familiar with ModLoader API and MCP, as well as getting familiar with Eclipse which is my IDE.
=== Information ===
This mod adds new tools, smelting/crafting recipes, and new armor to the game to add some more things to make and do. By using obsidian, you can harness its durability and strength to achieve more!
Incompatible with any mod that uses bs.class or dq.class files.
=== Mod Features ===
- News items and blocks!
- Adds new tools (Sword, Pickaxes, Shovel, Axe, Hoe) to the game which are made from Obsidian bars.
- Adds new armor to the game which are made from Obsidian bars.
- Allows you to get some items back from what you used to craft. Easy reverse engineering :biggrin.gif:
- Obsidian battleaxe
Please note all obsidian tools and swords will have double durability of diamond and are SLIGHTLY faster although I may reduce the speed a bit so that it is more balanced.
In progress Features
Obsidian battleaxe
Planned Features
While wearing entire set of armor, fire will not damage you - Suggested by Kretzge
Not be tied down my files that may cause incompatibilities
Obsidian chests, cannot be blown up by tnt or creepers
If you have any ideas on what to add, please let me know.
=== Pictures ===
More pictures to be added as mod updates are released.
=== Previous Releases ===
Version 1.4 - Current release
Added an Obsidian block, made same was as iron but with obsidian bars
Changed some properties of the blocks
Added a speed boost to breaking of the obsidian ore and block if you are wielding an obsidian pick
Made the obsidian tools SLIGHTLY faster than diamond, may change back to re balance.
Version 1.2
Modloader compatible
Version 1.1
Reverse engineer your tools! Smelt your tools to get a unrefined obsidian ore. Smelt the ore to get a obsidian bar. Its one way to get back what you lost.
Version 1.0
Fixed some textures on the images
Added armor to the game, all of which are made from Obsidian bars
Version 0.1 - Mod release
Adds new item, Obsidian bar to game.
Adds new tools to the game, all of which are made from Obsidian bars.
I have noticed that the properties of water have changed a bit. When you place a source block it now leaks.. and doesnt stay in midair like it used to. Can someone confirm this?
We are allowed to bump, under certain rules, not on first page anymore and some time has past, 12 hours passed, and I was allowed to bump, so calm down.
I was testing it :tongue.gif:
found out that:
slows down movement
stops jumping
and stops fall damage until you touch any blocks other than the spider webs
time to make some awesome traps :tongue.gif:
I tested all the things you said and thats really cool, I never even touched it before I posted. I dont understand the damage after you touch another block thing because that makes no sense, but traps.. smp.. *troll face*
Im not sure if this is a old or new 5 clock design so I would like some input. I was doing some testing and I did this with redstone torches instead of the delayers, although I may incorporate them somehow.
I have noticed that the properties of water have changed a bit. When you place a source block it now leaks.. and doesnt stay in midair like it used to. Can someone confirm this?
0
That sounds fun :biggrin.gif: Maybe I should add that to the poll :wink.gif:
0
When I get home I will look into that, I saw in the BaseMod file this getMinecraftInstance function but didnt know how to use it. Thank you very much, Im sure this will help me greatly!
0
If anyone knows how to do this, it would be a great help.
I know EntityPlayer and InventoryPlayer have the functions I need, but I cannot initialize them so that I can use them, please, if you can, help!
0
0
0
0
0
Hello everyone, I am sure there have been mods like this before but I would like to introduce you to my mod. This mod is rather basic but shows the fundamentals of modding in Minecraft. I chose to do this mod to become familiar with ModLoader API and MCP, as well as getting familiar with Eclipse which is my IDE.
=== Information ===
This mod adds new tools, smelting/crafting recipes, and new armor to the game to add some more things to make and do. By using obsidian, you can harness its durability and strength to achieve more!
Required Mods:
ModLoader - http://dl.dropbox.com/u/20629262/Latest/ModLoader.zip
Download Link: http://dl.dropbox.com/u/31449662/Obsidian Tool Mod v1.4.rar
Version 1.2: http://dl.dropbox.com/u/31449662/Obsidian Tool Mod v1.1.rar
Version 1.0: http://dl.dropbox.com/u/31449662/Obsidian Tool Mod v1.rar
Version 0.1: http://dl.dropbox.com/u/31449662/Obsidian Tool Mod v0.1.rar
Incompatible with any mod that uses bs.class or dq.class files.
=== Mod Features ===
- News items and blocks!
- Adds new tools (Sword, Pickaxes, Shovel, Axe, Hoe) to the game which are made from Obsidian bars.
- Adds new armor to the game which are made from Obsidian bars.
- Allows you to get some items back from what you used to craft. Easy reverse engineering :biggrin.gif:
- Obsidian battleaxe
Please note all obsidian tools and swords will have double durability of diamond and are SLIGHTLY faster although I may reduce the speed a bit so that it is more balanced.
In progress Features
Planned Features
If you have any ideas on what to add, please let me know.
=== Pictures ===
More pictures to be added as mod updates are released.
=== Previous Releases ===
0
0
We are allowed to bump, under certain rules, not on first page anymore and some time has past, 12 hours passed, and I was allowed to bump, so calm down.
Person above, Bump :3
0
0
0
I tested all the things you said and thats really cool, I never even touched it before I posted. I dont understand the damage after you touch another block thing because that makes no sense, but traps.. smp.. *troll face*
:biggrin.gif:
(Never done this)
0
So, is this a new or old design?
0