Jump to content

Frontsalat

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by Frontsalat

  1. I feel dumb now...it's working. I should have utilized the fly function in creative mode earlier. You want to use the void method, not the boolean. Now I just need to find a frequence of quantity. The one used in ore generator doesn't semm to work.
  2. I'm quoting @larsgerrits here... ...the vanilla WorldGenLakes class is a World Generator class, and it implements methods the same way I do. I've found another thread using a method based on IChunkProvider, but I don't want to do Biomes or Dimensions, I only want to spawn my fluid in patches of oil. Which class type do you exactly advice me to use?
  3. So I've made my own custom fluid crude oil and was able to spawn it via the ore generator. But what I really want is to spawn them as patches of oil. I'm registering the LakeHandler in my main file like this... ..and then use this code trying to spawn the oil patches... ...it's working perfectly inside the ore generator, despite not being an ore, but what's wrong with it in the lake handler?
  4. It's ok, the Mod I'm creating is supposed to be played like that...no auto health regen...to be honest I think turning off auto health should've been an option in Minceraft to beginn with. Btw., are you the Jabelar from the tutorial website? If so, I'd like to point out my gratitude to all your tutorial efforts...
  5. See oever here, I think this might be the best solution... http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/2397501-turning-off-auto-health-regeneration-please-no
  6. Ok, figured myself. And in case you wonder why I'm opening a new thread when finding things out myself? Simply because I already spend like two days searching for a solution, but obviously used the wrong search terms in Google and the forums. So in future, if you're bothered by continously repeated threads asking the same question (there were like 5 or 6 answering my question on this forum), then I'd recommend to improve the communication with your search function, as well as Google. I was searching for 'forge replacing vanilla ore', but the search term that brought all the happiness and answers was 'forge ore generation'. So it's nobodys fault here. I've had my fair share of effort, and I will every day when modding, so please, just answer questions, without acting all superior just because you know things that you learned from someone else knowing things, who learned things from someone knowing things. If you have knowledge, share it! And share it in detail with useable code! The more infos you give, the less likely will people open new threads regarding the matter. That's how humanity works since more then 10.000 years...you gain knwoledge, you give it to others...WITHOUT all the drama involved when acting all superior... However, here's the solutions. Code for replacing blocks that are not ore, needs to go in your EventHandler registered in your main file with... Code to remove vanilla ore blocks because the upper version won't work on ore blocks (iron, gold, coal etc.), so you're allowed to distribute your own blocks via world generation...register as...
  7. Well, if you can't be bothered to have some own effort then nobody will^^
  8. Items go into assets/yourmodid/textures/items. Make sure the texture name path is correct in your item file.
  9. Oups, I'm sorry. https://www.google.de/?gws_rd=ssl#q=minecraft+forge+1.8+modding+tutorial+world+generator
  10. Armor parts need to be placed inside assets/yourmodid/textures/armor, the items need to go into items.
  11. Here's my world generator code...compare to your own...
  12. In the past for 1.5.2 I was using the blocklist command to replace diverse blocks during world generation. I've adapted the feature to version 1.7.10, but somehow it will only work for instances of blocks that are not ore. Here's the code by dieSieben07, expanded by me:
  13. The title says it already...I've come so far to find this inside the EntityPlayerSP... I'm just unsure how to manipulate it so health will not automatically regenerate. A much better solution would be to turn off auto health regen without editing base files. Is this possible via player.capabilities? Or any Forge event for this?
  14. New features are good, but why remove code that's already properly working?
  15. Why anyone would change code and turn it into "work in progress" state, and thus increasing the amount of code used, is completely over my head. You're not supposed to change a running system...and you're specifically not supposed to change a running system wihtout proper documentation. And don't even get me started about how you guys see new code as opportunity to make everything "easier and better". Why would you change player.landMovementFactor to private and don't replace it with something proper and easy to use in the first place? That's just rubbish.
  16. Thank you very much guys, it's working perfectly so far, though I haven't tested it completely into detail. The final code: I know that this will be a great help to a lot of people, because I found tons of threads with people asking on how to remove vanilla drops, but no one really made it. So you did not only help a mere Copy Paster, but probably an army of unexperienced modders...I wonder if the creator of Mo Creatures ever thought about excluding vanilla drops? However, for anyone using the code above, there's also a portion inside that let certain entitys drop Bones when killed, you probably want to remove this portion of code, if only want to use the remove vanilla drop feature. Ranting? In fact Pelep was ranting at me all the time just because he couldn't stand me telling him the truth about his attitude and being sarcastic to Hydroflame. He was even mocking my language, despite the fact that English only is my second language and he's not even capable of using big letters in Nomens and when a sentence starts. Honestly, if they're all so "mature" they should grow some balls and be less reactionary and exaggerated...and post that damn code... Read carefully through the thread to figure that there's no response from my side to any of his "rants".
  17. Probably because I'm not a simple copy paster, yet not a skilled coder. I'm somewhere in between, loosely base my understanding of code on trial and fail... I said I'm in lag of time to learn every single portion of Java code. I do know from Phython code that a iterator is something that's used to traverse between objects or containers. At least that's what the Java and the Phython Tutorial said. All possible fixes, but drop.remove was none of them. I thought since the "Iterator iterator" was nowhere defined, I had to define it. However, changing it to drop.remove fires out this error log... ...and Eclipse says... ...I don't understand what Eclpise wants from me, but MC error log is itching about the array list, if I interpret this correctly. Ohh wait, fatal error due to a incompatible modification of a base file, which is rubbish, because I did not touched any base file at all. Do I maybe need to put the code into my proxy class? You'd understand sarcasm or Irony not even if I smashed it in your face. And please, could you wipe my little tushi and chew my meat for me?
  18. Ohh, so you're saying I was to dumb to organize my imports. Well then thank you very much for pointing out my complete lag of understanding Java AND Eclipse. I'll do instantly what you tought me...*hastes pressing ctrl+shift and o (not the zero but the o, like oooohhhh) and anxiously licking his lips for expected success*. Oh crap, it didn't work... I'm just curious, if there is any difference in Iterator (which you want to import) and iterator (which is a container reference)?
  19. MC is crashing as soon as I kill a cow. I can't get the red underline removed from the iterator.remove(); section. If I try fixing with Eclipse it's also crashing. Code so far: Error Log:
  20. Man, the time it took you to write all thoose walls of text could have been used to just post the damn code. Now get of your throne, you don't even remotely listen to what I'm telling you Java-Nerd. If your job is Java Coding then you probably kicked yourself a penalty in all your weirdo arguments, right? Wait, I'll tell myself so you don't need to upset yourself...GO LEARN JAVA!!! I'M TALKNG TO ME, DO ME HEARD ME??? GO LEARN JAVA!!! Also, why do I slightly get the feeling no one every achieved that? There should have been a tutorial around already. At least GoToLink has mercy, but unfortunately I'm obviously to dumb to get further then this, and it still doesn't work: package MetallurgyRealism; import java.util.Iterator; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.passive.EntityChicken; import net.minecraft.entity.passive.EntityCow; import net.minecraft.entity.passive.EntityPig; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.living.LivingDropsEvent; public class MetallurgyRealismLivingDrops { public static double rand; @ForgeSubscribe public void onEntityDrop(LivingDropsEvent event) { if (event.source.getDamageType().equals("player")) { rand = Math.random(); if (event.entityLiving instanceof EntityCow || event.entityLiving instanceof EntitySheep || event.entityLiving instanceof EntityChicken || event.entityLiving instanceof EntityPig || event.entityLiving instanceof EntityWolf) { if (rand < 0.1D) { event.entityLiving.dropItem(Item.bone.itemID, 2); } } } } public void onEntityDrop1(LivingDropsEvent event, World world, double x, double y, double z, Iterator iterator) { ItemStack stack; Iterator drop = event.drops.iterator();{ while(drop.hasNext()){ stack = ((EntityItem)drop.next()).getEntityItem(); if(stack!=null && stack.getItem().itemID == Item.leather.itemID){ iterator.remove(); event.drops.add(new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, new ItemStack(MetallurgyRealismModBase.armorBootsBone))); } } } } }
  21. I'd say I have to go with something like... event.entityLiving.removeItem(Item.leather.itemID) ...but it didn't work So I was right when thinking you're the little smarty by reading all the miriads of your posts on this forums, telling people to learn something, instead of just helping them. Look, it gains you nothing in life to know so much about Java code. But it gains you a lot of envy by acting like a dick. And obviously I can't know as much about Java as you do, because clearly I have a life. It's not lag of skills or commitment, it's simply a lag of time. Modding communitys are supposed to share and help each other, at least that's what we're doing over at Skyrim Community...seems like attitude over here is far more reserved and superior. Feel pleased about your skills, because that's probably all you got. Exceptionally I want to remove leather drops from cows and make them drop fur instead, so I'm capable of processing it.
  22. This would have an effect on the new items added or on any single item to be spawned by dead entitys, but does absolutely nothing to singled out vanilla drops. Except you want me to edit base files... you can do what gotolink said, but that would stop all the entity's drops from spawning. if you want it that way, then go ahead. if you want to remove just a specific item, iterate through the list of drops and check if it's the item you want to replace, then replace it, if it is. The iteration did not seem to work on items dropped by mobs. I got it working on blocks, but there's no equivalent code...or at least I found none. Also tried to modifie this code, to no avail: Iterator<IRecipe> iterator = CraftingManager.getInstance().getRecipeList().iterator(); while (iterator.hasNext()){ IRecipe recipe = iterator.next(); if (recipe == null) continue; ItemStack output = recipe.getRecipeOutput(); if (output != null && output.getItem() != null && removeSet.contains(output.getItem())) iterator.remove();}
  23. Look, if you know something, don't give me tension torture. If you'd happen to know something just speak it out loud, without acting all superior. I wouldn't come here and ask if I haven't already tried my butt off. Obviously I'm already using event code: But adding new drops isn't the same as removing the vanilla ones.
  24. The title basically says it. I'm aware of ways where you'd just replace the vanilla mob with a custom one, and then let this custom mob drop the things you want it to drop. But 1. this is ensured to create bugs with mods like Mo Creatures and 2. creates miriads of unnecessary files filled with walls of code. Isn't there something more elegant like this for blocks? Block.blocksList[block.oreCoal.blockID] = Block.blocksList[MetallurgyRealismModBase.BlockSlate.blockID]; Something like, for example: Item.itemsList[item.leather.itemID] = Item.itemsList[MetallurgyRealismModBase.MaterialFur.itemID];
  25. So items will always repair themselfs if not the setNoRepair flag set? Interesting. I'd swear I haven't noticed that before. However, works brilliantly perfect now. Thank you very much friend.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.