ProspectPyxis Posted March 12, 2019 Share Posted March 12, 2019 (edited) I'm trying to make a capacitor block with one side being an output and the rest of the sides being input. How would I go about implementing this? Edited March 15, 2019 by ProspectPyxis Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted March 12, 2019 Share Posted March 12, 2019 Return a different capability depending on the side (facing) passed in. Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
ProspectPyxis Posted March 12, 2019 Author Share Posted March 12, 2019 So what I should do is have two capabilities, one that can only input and another that can only output, return those for the right faces, and somehow sync the two energy values? Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted March 12, 2019 Share Posted March 12, 2019 No, have one normal energy storage. Then have a wrapper for that storage that can only receive and another wrapper that can only send. Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
ProspectPyxis Posted March 13, 2019 Author Share Posted March 13, 2019 A bit of a noob question now, but how would I do that? I'm trying to look for some code examples but I'm coming up dry. Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted March 13, 2019 Share Posted March 13, 2019 1x energy storage in an instance field 1x (anonymous) class that wraps said energy storage (all methods delegate to the energy storage except canRecieve and receiveEnergy) in an instance field 1x (anonymous) class that wraps said energy storage (all methods delegate to the energy storage except canExtract and extractEnergy) in an instance field Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
ProspectPyxis Posted March 13, 2019 Author Share Posted March 13, 2019 So from what I'm understanding, let's say my energy container class is named EnergyManager. I should make one primary EnergyManager instance, then have two other anonymous EnergyManager instances that override every method to only interact with the first instance. Am I going about this correctly? Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted March 14, 2019 Share Posted March 14, 2019 Yes, if EnergyManager extends EnergyStorage it implements IEnergyStorage Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
ProspectPyxis Posted March 15, 2019 Author Share Posted March 15, 2019 Yep, after testing, doing that works perfectly. Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.