Posted December 23, 20168 yr Wondering how I am able to prevent hopper interaction when using capabilities. I can just hack it by pointing it to a dummy ItemStackHandlers for extraction. This however wont stop input. Any ideas?
December 24, 20168 yr Or just not return them when a side is passed. 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.
December 24, 20168 yr If I return null it crashes Post your code. 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.
December 24, 20168 yr Author Crash Log: http://pastebin.com/dmEkhNRV Tile Class: https://github.com/BeardlessBrady/Currency-Mod/blob/master/src/main/java/gunn/modcurrency/common/tiles/TileSeller.java Crashes when I place a hopper under the block
December 24, 20168 yr Author Ignore the if states for facing, its for other purposes later on. Should be the same result without
December 24, 20168 yr Ignore the if states for facing, its for other purposes later on. Should be the same result without You cannot return null. 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.
December 24, 20168 yr what do I return if I don't want it to interact with any slots then? return super.getCapability(capability, facing); 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.
December 24, 20168 yr Still crashes when I do that Oops I see that your hasCapability always returns true when they are looking for a IItemHandler one. You need to make the same checks and return false. 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.
December 24, 20168 yr Author thank you very much!. Last question, is there an easy way to detect the difference between inserting and outputting with a hopper, or any other pipe type item
December 24, 20168 yr thank you very much!. Last question, is there an easy way to detect the difference between inserting and outputting with a hopper, or any other pipe type item There are two ways. You can assign your own ID to each slot and handle the implementation your self or add internal methods that only your TE will use in a custom IItemHandlerModifiable. 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.
December 24, 20168 yr Still crashes when I do that Oops I see that your hasCapability always returns true when they are looking for a IItemHandler one. You need to make the same checks and return false. Because of this my hasCap method returns getCap(...) != null just to avoid the headache. 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.
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.