Posted August 24, 20196 yr I am making a block that is similar to glass as such I would like to make it so that it won't drop anything when broken without silk touch.
August 24, 20196 yr 10 minutes ago, Eilux said: I am making a block that is similar to glass as such I would like to make it so that it won't drop anything when broken without silk touch. What MC version? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 24, 20196 yr 41 minutes ago, Eilux said: 1.12.2 Ovverride getDrops in your Block class. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 25, 20196 yr 6 minutes ago, Eilux said: what should I override it with? If the item mined with has silk touch add the ItemStack you want to the list. If it doesn't don't add anything to the list. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 25, 20196 yr One of the parameters is a boolean called isSilkTouch. 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.
August 25, 20196 yr Author Ok I am having a difficult time figuring out what exactly I'm supposed to do if somebody could show me some sample code that would be very helpful.
August 25, 20196 yr 10 minutes ago, Eilux said: Ok I am having a difficult time figuring out what exactly I'm supposed to do if somebody could show me some sample code that would be very helpful. Apparently there is no boolean for silk touch. Instead override getSilkTouchDrop and getItemDropped. Return the block in an ItemStack in the first one and Items.AIR in the second one. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.