He was going on got his clothes he works here and welcome back to another minecraft bonding this tutorial for one point twelve point two in this tutorial we are going to be going over custom loot tables as on our entity miniseries we didn’t manage to do it as we had some Issues with it so let’s get started what you want to do um actually before I do that I want to mention there’s one thing we didn’t do in the event tutorial which I totally forgot and but this needs to be a subscriber then and that will now Be in the description of the event tutorial but I just realized that we didn’t have that and obviously that would be an issue and it wouldn’t have registered so yeah that’s probably quite a big issue so for custom blue tables we need to go ahead and create an event and We’re gonna call this event loot table event inside here being too awfully do at subscribe event and then we need public void loot tables loot table drop actually custom loot table drop and in the promises we are going to have living drops event event and in here we’re Going to put random round is equal to a new random and import both random subscriber Ventana living drops event then you want to do if event not get entity living or seeing my clips to do it stuff for some reason gets entity living his instance in students Is instance of okay I can’t type today oh my god their instance of empty text then we need to do if Rand dot next int that’s important you test so here this is the meaning of parameter here so this is the chance of it dropping the loot Table and so you can go ahead and do something like if you put fifty Randall next in is equal 50 now 50 equals zero then that means that there is a 1 in 50 chance that it will drop this item so just for testing purposes I’m going to Fit this to 5 so we have a reasonable chance but you probably want to put it to a like 1 so it drops almost every time and then you for example you could have an extra drop so if Rand don’t next int is equal 20 20 is equal 0 then we Can do the same thing so inside of these if statements you want to put event don’t get to entity living dot entity drop item new item stack and we can delete offset and put that down there inside of here we can simply just put whatever we want it to drop so I want mine to drop let’s see let’s let’s make it drop the Lightning staff okay so it actually requires a float and so I’m just going to put 0 0 F because it’s offset and we don’t want any offset and obviously for this one you would do Event get entity living entity drop item new item stack and then 0.0 yeah and here we’ll actually do plop in its dot and we will make it drop silver furnace sure I know it’s random but it’s something in fact Li in this video we’ll also go over how to override vanilla Loop tables so there are several ways you can do this you can do this via actually doing a Jason Luke table or you can do it via event just like we’re doing here so you would just add another one let’s just change this to an else–if and yet you would go down here And your another if statement so if event don’t get NC living is dot now you could do dot equals and then you could do entity silverfish I believe thank you just check I don’t really know how to use dot equals in this Circumstance okay no so we’ll just do instance of an T silver fee then we can do if brand next int of like five is equal to zero then we can do event dot gets entity living dot and C drop item you could again and here with a new item Stack and I wanted to make it drop our silver block and zero point zero f input entity silverfish or not make them wait would that be why we can’t use equals my left is chess this so should wha and I think we should be able to maybe Cast object here let’s see if that works no bad doesn’t work either that’s fine oh I forgot to change it back to incidents off there you go so now let’s say she’s all we need to register the event of course so let’s go into our do We put it in in it no use he’ll handlers and go to my blind various event handler and then we can go up here and we can do looped table what do we call it loop loop table event a new table event equals looped event no loose event includes new loot table event And then we can do minecraft forge minecraft forge dot eventbus what register loot event and give that save now we can actually go ahead and run the game so I will see you guys in the game this guy’s right in the game and I’ve spawned a few of them in so let’s go Ahead and kill one and you see it drops lightning staff but I’ll feet they will only drop it obviously there’s a one in two chance that they drop it so it’s actually quite common however if we kill a silverfish no not first time you go we Go at second time but yeah you can see it’s quite rare we’ve only got one from all the silver history of killed and if I kill a load more of my test mobs we should after a while I actually haven’t made a stack limit for these What did I even add it whatever it wasn’t quite right about lots of things we could be here for a while while lots of things you killed 20 so we should have got one by now whatever it was just met well it was oh yeah it was a longer Silver furnace hmm it’s quite odd actually that we’re not getting any because we should be so here’s my plan [Applause] we can get one from that [Applause] Whoa holy damn these guys are insane still nothing hmm and you can’t really make it much what did I put the rarity is 1 in 20 I see 1 in 21 yeah may have embossing one that’s actually quite odd maybe excuses and elves yeah I think if You change that to an F that should work but I’m not going to test that right now so if you guys did enjoy this video please do be sure smash your face into that like button and subscribe really enjoyed please to be sure surrett and i’ll see you guys in the next video Goodbye Video Information
This video, titled ‘Minecraft Modding Tutorial 1.12.2 – Episode 27 – Custom Loot Tables’, was uploaded by TurtyWurty on 2019-05-07 14:51:41. It has garnered 2321 views and 32 likes. The duration of the video is 00:14:44 or 884 seconds.
Hey guys, TurtyWurty here, in this video we cover how to create a custom loot table for both a vanilla mob and for our own mob without using JSONs. If you have any issues or problems you can contact me via the discord link below and all the code used in this video is also below in the GitHub link. Hope you guys enjoy!
My Personal Mod: https://minecraft.curseforge.com/projects/minecraft-madness-mod/ My Discord Server: https://discord.gg/d5cGhKQ My GitHub: https://github.com/DaRealTurtyWurty/Tutorial-Mod