Posted May 9, 20169 yr I want certain mobs to drop items when killed with specific swords, how do I do that?
May 9, 20169 yr I have no clue how to do that but there is a guy named Neale that does tutorials and he has made a video on this: All credit to Neale of course.
May 9, 20169 yr You really don't like me do you? Lol there's nothing wrong with having a one hour video for explaining how to make mobs and blocks drop different items always and also only when using specific tools, at least it's in clear and good detail rather than a one line answer.
May 9, 20169 yr Yes there is, if you actually watch the video, but you can't help but assume instead of actually looking into things properly.
May 9, 20169 yr if you actually watch the video Yes, but that would require an hour of my time. I have better things I could be doing with that hour. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 15, 20169 yr I don't see the point of the argument, if you can do better then near make your own series. Crayfish and Neale are the only half decent ones out there, yea there using stuff that should not be used and ranting about there mistakes dose not help make things better. you don't want us using item.getUnlocalizedName.substring(5); but use Item#getRegistryName its not much of an explanation to be honest A single Video explaining why we should use the later and how it should be used properly would be the best way to fix this problem. My self i learn by doing/examples
May 23, 20169 yr I admit using item.getUnlocalizedName.substring(5). That is because I don't know anything better and/or any reason to change if I don't change the unlocalized name. The video isn't very efficient, but there aren't that many tutorials past 1.8. Also, the most important thing is "does it work." If the answer is yes, then is fine. Also Anora said Crayfish and Neale are the only good ones. Kevin M is a good tutorial make too. Summary: The tutorial isn't the best in the world, but lately the amount of 1.8.9 or 1.9.x tutorials are close to none. His tutorials work and that is what matters. Also, what is a good alternative to item.getUnlocalizedName.substring(5)? You keep saying don't use it, but I see no working code examples and no reasons to this.
May 23, 20169 yr The boldness of d7 is some next level shit! So, since you are so fond of this video apparently, here you go, I watched it start to finish. Random notes throughout: "Do we want protected? *fiddles* Let's just make this public to be safe." ... ... ... The way he types out "GameRegisty...GameRegistrry...GameRegistr" every single fucking time makes me want to scream at my screen. This guy spends way too much time on his stupid meaningless comments. "//Alloys" serves no purpose. None whatsoever. 16 minutes in: Yay, copy-pasta'd bad model registration code. Yay. And using the unlocalized name bullshit as well. Shortly after, yay json-model creation by, guess what, copy-pasta. 23 minutes 40 seconds in, first time he mentions custom drops. The fucking point of the video. "... because it's spelled LivingDropsEvent" - Yes, because you don't know how to fucking use your IDE. Jesus mercy, why am I watching this. "We're gonna call our event.entity is an instance of EntityChicken" - He does sentences like this all the time. They make no sense, they convey wrong information. Now he uses event.drops directly instead of just doing event.entity.dropItem / entityDropItem which would save a lot of hassle... Wow, he even attempts to explain what his code does, but does a terrible job at doing so. He explains nothing he has not explained before. All he basically says is "This code makes new drops appear." ... "Under our init class" ... head meets wall. 30:26 in (7 minutes after he starts doing drops) he is done with his drops explanation. This video could be those 7 minutes. Then he continues saying that entities spawned in before the drops handler was created will not drop the new item. This is complete bullshit, as is evidenced by the fact that while he is saying this he kills an existing chicken resulting in his item being dropped. 31:30: He is now suggesting that drops for your own entities are also to be handled via LivingDropsEvent. This is false information. 34:20: Yay, new random object for no reason. 35:30: event.harvester can be null. This will NPE randomly. 47:40: yay, nested ifs for no reason. Also the following explanation of block states is an abomination. Overall this video feels like a (badly) moderated instruction to just copy-paste what he tells you to copy-paste. "But what does it..." - "Just copy paste." He has no idea what the fuck he is doing, he is probably just reading it off from somewhere else and throws in random "programming words and phrases" (like "we're gonna call this...", he uses that all the time for everything. 99% of which has nothing to do with calling a method) to make it seem like he knows what he's doing. This video is showing bad code and displays it in a horribly inefficient manner. This is what I had gathered from previous times where I watched a video of his. But seriously - after yaers of codding/modding (I started second quick after 1st) I can say that tutorials and copy-pastes will not teach you shit! Learn to read callbacks and search methods - just because people don't make tutorials on some stuff, doesn't mean it's not possible - you can practically extend any class there is and override whatever you want and then apply it to game. Don't limit yourself with tutorials, do your research on source. I'd also recommend open source mods of good quality. 1.7.10 is no longer supported by forge, you are on your own.
May 23, 20169 yr Also, what is a good alternative to item.getUnlocalizedName.substring(5)? You keep saying don't use it, but I see no working code examples and no reasons to this. Use the registry name system ( setRegistryName and getRegistryName ). In 1.8.9, these are methods of Block and Item ; in 1.9+ they're methods of IForgeRegistryEntry (implemented by Block , Item and other singleton classes). Registry names are IDs and must not change, unlocalised names can change at any time. Unlocalised names are only designed to be used for translation/display purposes, they're not guaranteed to be unique or consistent. Set the registry name in the constructor, then use the overload of GameRegistry.registerBlock / registerItem (1.8.9) or GameRegistry.register (1.9+) without the name argument. If the registry and unlocalised names of a block/item are the same (which isn't always the case, e.g. records), set the unlocalised name to the full registry name ( setUnlocalizedName(getRegistryName()) ). This will include your mod ID in the unlocalised name, preventing conflicts with other mods. The default model loaded for every Item is the one with its registry name, so use this as the default location for your models. I use this method in most of my items to set the registry and unlocalised names. I register my items here. I register my models here. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.