Everything posted by Moritz
-
Block Drops
English is not my motherlanguage. I do not have the knowlegde to tell what i want to tell. My mod tries to hold it self*. *Does not need other mods and apis And only 5 things does my mod uses from forge. 1st: Config File 2nd: Texture Provider 3rd: Furnace Recipes 4th: CraftDamage (Crafting Handler) 5th: ToolClass
-
Block Drops
Ill change my workspace to 1.3.2 at the 1.2.2013. But every event what forge add comes from the minecraft source and this is compatible to the most versions. Try to use my code and finish it please. And please try to use only minecraft and no forge.
-
Block Drops
I am at version 1.2.5 not 1.3.2 or 1.4.6 How Can make it to drop something else than dirt when the player hold a stick in his hand.
-
Block Drops
The code did not work. with this i override the dirt: Block.blockslist[3] = null; Block.blockslist[3] = new BlockCustomDirt(3, 2).setBlockName("dirt"); Here my code of the dirt
-
Block Drops
ok. thanks. and if that does not work?
-
Help with custom crafting recipes
GameRegistry.addRecipe(new ItemStack(tes_BaseMod.moonstone, 1), new Object[]{ " X ", " X ", "XXX", 'X', Block.blockClay, 'P', Item.paper }); I only see You use the block Clay but not the paper. thats the mistake i think because he can not fine the symbol from the paper (P). Maybe that crashes your game
-
Block Drops
When i copy the code from gravel and paste it in my customdirt than it do drop flint. But the thing what does not work when i write the if(he has a stick in his hand) than he only drops dirt nothing else. same as change it (than he would drop only flint and sometimes dirt. but that didn't work too. and no i do not know what par3 means. par1 is for the metadata but par3 idk. befor i send this answer i tell you what i want to do. Gravel is very rare at minecraft (At the start). And my mod do need it at the start so without you are stuck. To help the player i want that when the player holds a stick in his hand and mines dirt than he has a chance to get flint, and when i paste the gravelcode. and a technic moduser use my mod he has to much flint because a quarry mines everything.
-
Block Drops
Hello. I got Some problems with my Block Drops. File: But it do not Drop Flint. What do i do wrong?
-
Help with Durability Value
RedPower has that and its easy to copy from her surces. Read the redpower 2 Source. Equilant exchange uses containerItems. But redpower remove the item and rebuild it with one more damage
-
tool durability
why dont you use this? int damage = 0; public int getDamageVsEntity(Entity par1) { return damage; } public void onUpdate(ItemStack par1, World par2, Entity par3, int par4, boolean par5) { if(par5)//if the player hold it in the hand { if(par1.getItemDamage() == par1.getMaxDamage()) { damage = 1; } else { damage = 9; } } } than every tick he hold it in his and its updating the damage. I hope its helping.
-
Need help with drops.
There are to ways to add Drops.. First way. Touch the leaves.class Second way: You replace the leaves class with your class and ad the drops (better way because when you deinstall the mod the world does not break: here the code for replacing the blocks: Block.blocksList[17] = null; // Block.blocksList is where all blocks are // [17] is the blockID // null is to delete the Wood.class now the replacinh Block.blocksList[17] = new BlockCustomWood(17).setBlockName("blockWood"); but you must give him an id thats why the (17) i hope it helps
-
[Any Version] Insain Recipe Problem
Hello. I wrote a mod Dynamic Tools (Version 0.0.20) is in Testing mode. Its Nearly finish. Now the Problem. i used "for loops" to doesn't write every recipe by my own. Now its about 1,8 Mio Recipes (1.800.000 Recipes) Every Time you craft something its lagging the fps go down to 6. And do not say go down the recipe. The name says Dynamic Tools. Without this its not Dynamic. So how can i make it that the crafting manager is not overloaded? Thanks Moritz
-
tool durability
make it like my mod (Tools Works backworks!) You start at the last use and ends at the first! Works pretty fine. Or use this public boolean onBlockDestroyed(ItemStack var1, int par2, int par3, int par4, int par5, EntityLiving par6) { if(par1.getItemDamage() < par1.getMaxDamage()) { par1.damageItem(1, par6); } } its only give damage if the damage is smaler than the max Damage. hope it helps..
-
Problem with "Exp Bank" Item
i would do it like this: package net.minecraft.src; import java.util.List; import net.minecraft.src.*; public class ExpBank extends Item { int Exp = 0; int maxExp = 1000000 int howMuch = 1; //how much exp it give or consum int mode = 0; // Mode 0 = nothing, Mode 1 = Give, Mode 2 = Consum public ExpBank(int id) { super(id); setMaxStackSize(1); } @Override public void getTextureFile() { return "/test.png"; } public ItemStack onItemRightClick(ItemStack par1, World par2, EntityPlayer par3) { if(par3.isSneaking()) { howMuch++: } else { mode++; } return par1; } public void onUpdate(ItemStack par1, World par2, Entity par3, int par4, boolean par5, EntityPlayer par6) { if(par5)// Has the item in the hand { if(mode > 3) { mode = 0; } if(howMuch > 10) { howMuch = 1; } } else { if(mode == 1) { if(Exp > howMuch - 1) // This is for safe so that if no more exp is there than it will not give Exp { par6.addExperience(howMuch); } } if(mode == 2) { if(Exp < maxExp) { par6.removeExperience(howMuch); } } } } public void addInformation(ItemStack par1, List par2) { par2.add("How Much Exp Stored: " + Exp); par2.add("How Much Exp Can it Store: " + maxExp); par2.add("Exp Transfer Level: " + howMuch); } public String getItemDisplayName(ItemStack par1) { return "Exp Bank"; } public int getIconFromDanage(int i) { return 1; } } I hope Its helping.
-
[1.2.5] Manipulating Block Drops //And No i will not update befor its finished.
ok thanks i only want to add a drop not more. Than it comes in an updated version and not yet.
-
Exportet Mod question
When i edit basic classes from minecraft. and export it (put it in a zip) and load them in modsfolder. does they still change the class? I mean do i not must put the mod in the minecraftjar?
-
[1.2.5] Manipulating Block Drops //And No i will not update befor its finished.
You mean changing the item/Block class? and how can i unregister Blocks and items?
-
ModLoader and GameRegistry
All People say GameRegistry is Better than modloader. But nobody says and maybe of the people know thats a lie! I'll Explain it. Modloader: ModLoader does go to the GameRegistry class and use it. GameRegistry: Have the code. Ergo: ModLoader is in FML only a Path. So its the same. you can Choose. ModLoader And Gameregistry = Same but modloader is a path For All Registries! Its a lot easier to handel.
-
Replace all items with one ID
That will not work because: Tools Using metadata to count the damage. All items that do not have uses or having a function like maps abd clocks can be on 1 id but that is not a good idea because you lose fast the watch about it.
-
[1.2.5] Manipulating Block Drops //And No i will not update befor its finished.
How can i manipulate Block Drops without Touching the class I mean that sand drop randomly if you do not have anything in your hand a pice of flint. Thanks for Reading. Every post to update is Stupid! I have my reasons to not updating. If it working only at a newer version Explain it i will use it when it is finished.
-
Recipes
Hello. here the code the question is at the end. It does Not load the recipe only these kind of a recipe. The question is why?
-
1.2.5/1.3.2/1.4
i should come much more online.. Sry for say Stuipid. I didn´t understood your answer and how ever. Sorry. I found a way to make it but i had to change it a little bit.. and im still on 1.2.5. Because its the version i can work with and having workspace there (workspace = Ice i can walk on it without breaking in). but thanks for the answering. i have to learn more about java. bevor i start this kinda damage system which detecting Block and Material of the Block. im now off and try to make my mod without helping (thats the best idea. i read only sources from other mods and try to learn from them.)
-
1.2.5/1.3.2/1.4
Sorry for this now. But you are Stupid!!! I do not ask for a function which make tools to tools. I asked for a function which make it possible to make counts at the moment when you are breaking a block. if you are using public boolean onBlockDistroyed(....) than its only 1 count but my damage SYSTEM needs more than 1 count... if you mine a block like obsidian it needs about 5 seconds. and every second you mine the tool should get damage that was my idea.. Here: diamondpickaxe 9999 dirt mined = 0 damage. 25 cobblestone mined = 5 damage 5 Gold ore Mined = 5 Damage 1 Obsidian Mined = 5 Damage and not like this mod file: public void load() { MinecraftForge.registerToolClass(diamondPickaxe, "pickaxe", 3); } why did i write this? public void tryHarvestBlock(ItemStack par1, Block par2, EntityPlayer par3) { // This code should detect if a block get mined. and should updated every 2 ticks. } This code should detect if a block gets mined (when the damage pictures on a block comes) and this function can be used for count something. and this function i need.... thats why i called tryharvestBlock and not StrVsBlock. sry for the stupid but i must say that for that answer....
-
How to make a crafting-recipe WITH Item, you won't loose
Its a container Item look in the Item.java an search for the item bucketLava there is setContainerItem(item) and there comes the item public static Item test = new Item(111).setContainerItem(test).setItemName("test"); and now when you craft an item with this item look here: ModLoader.addRecipe(new ItemStack(Item.diamond, 1), new Object[]{"XY", 'X', Item.test, 'Y', Block.dirt}); with this recipe the Dirt will consumed but the test item will be still there. I hope it help.
-
1.2.5/1.3.2/1.4
How should i start? I am working on a Mod which is replaceing all Tools (Pickaxe, Axe, Shovel, Hoe) in the game with mine. And i am nearly finishing my mod. But i am Stuck at my damage System, because there is no code like this Now my problem. I have the idea for the code. But i am to much noob to write it myself. Now the question. Can someone write me a code like this which will be activated when a block tries to get harvested? and if not, is it Possible to make a function like this? Thanks for reading.
IPS spam blocked by CleanTalk.