Jump to content

Bektor

Forge Modder
  • Posts

    852
  • Joined

  • Last visited

Everything posted by Bektor

  1. Hi, I'm currently trying to sign my jars, but I'm running into this error: :signJar FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':signJar'. > jarsigner returned: 1 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 5.76 secs My code for signing the jar: // propeties found in %homepath% under .gradle task signJar(type: SignJar, dependsOn: reobfJar) { onlyIf { project.hasProperty('keystore') } keyStore = project.keyStore alias = project.keyStoreAlias storePass = project.keyStorePass keyPass = project.keyStoreKeyPass inputFile = jar.archivePath outputFile = jar.archivePath } build.dependsOn signJar The keyStore has the filetype gpg. Thx in advance. Bektor
  2. Is there a way to tell gradle that this file is in my projects .gradle folder and not in the .gradle folder in the users directionary?
  3. I would suggest to add this little line of code above this method to ensure that it doesn't cause trouble on servers: @SideOnly(Side.CLIENT) Besides of that, I would really suggest you to learn Java as diesieben07 already told you. It will really help you with modding.
  4. Ok. Here is my updated code which should include everything: Just a small question besides: Does this search code in getBlocksToScan (EnumSet.allOf(EnumFacing.class)) also takes care of the null side which you mentioned some time ago? Just asking because this side or face is added to the connected list from where it is going to be used for the getCapability check, so that my cable does not ignore the Capability when it's not exposed to a specific side. transfer pipes: public class TileEntityPipeTransferEnergy extends TileEntityEnergy { private boolean flag = false; private HashMap<BlockPos, EnumFacing> connected = new HashMap<>(); // without pre-calculated weight public boolean shouldRecalculate = false; [...] @Override public void update() { this.flag = false; if(this.shouldRecalculate) { this.shouldRecalculate = false; this.findTransferPipes(); this.flag = true; } this.connected.forEach((pos, side) -> { final TileEntity tile = this.getWorld().getTileEntity(pos); IEnergyStorage storage = tile.getCapability(CapabilityEnergy.ENERGY, side); if(storage != null) { storage.receiveEnergy(this.container.extractEnergy((int)(10 / this.connected.size()), false), false); this.flag = true; // flag has to be a class member because of inner classes } }); if(this.flag) this.markDirty(); } private void findTransferPipes() { if(this.connected.size() > 0) this.connected.clear(); // we want to store the facing and the position Queue<Pair<BlockPos, EnumFacing>> toSearch = new ArrayDeque<>(); HashSet<BlockPos> scanned = new HashSet<BlockPos>(); scanned.add(this.getPos()); if(toSearch.isEmpty() || toSearch.peek() == null) this.getBlocksToScan(toSearch, scanned, this.getPos()); // temp object because we poll stuff out of the list Pair<BlockPos, EnumFacing> pair = null; BlockPos current = null; EnumFacing face = null; while(toSearch.peek() != null) { pair = toSearch.poll(); current = pair.getLeft(); face = pair.getRight(); scanned.add(current); if(this.getWorld().getTileEntity(current) instanceof TileEntityPipeEnergy) // check cable connection this.getBlocksToScan(toSearch, scanned, current); else if(this.getWorld().getTileEntity(current) instanceof TileEntityPipeTransferEnergy && !this.getPos().equals(current) && !scanned.contains(current)) this.connected.put(current, face); // found end of line } } private void getBlocksToScan(Queue<Pair<BlockPos, EnumFacing>> toSearch, HashSet<BlockPos> scanned, BlockPos pos) { for(EnumFacing face : EnumSet.allOf(EnumFacing.class)) { // same as pos.north(), just for all directions BlockPos offset = pos.offset(face); if(!scanned.contains(offset)) // create a new pair and add it to the list // a pair is just some class which holds two fields toSearch.add(Pair.of(offset, face.getOpposite())); } } [...] } Cable Block: public class BlockCable extends Block implements ITileEntityProvider { [...] @Override public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) { super.onBlockAdded(worldIn, pos, state); TileEntity tile = worldIn.getTileEntity(pos); if(tile != null && tile instanceof TileEntityPipeEnergy) { TileEntityPipeEnergy cable = (TileEntityPipeEnergy) tile; cable.searchNetwork(); } } @Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { TileEntity tile = worldIn.getTileEntity(pos); if(tile != null && tile instanceof TileEntityPipeEnergy) { TileEntityPipeEnergy cable = (TileEntityPipeEnergy) tile; cable.searchNetwork(); } super.breakBlock(worldIn, pos, state); // execute code above before the tile entity gets removed } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityPipeEnergy(); } } Cable TileEntity: public class TileEntityPipeEnergy extends TileEntity { private HashSet<BlockPos> connected_machines = new HashSet<>(); public void searchNetwork() { if(this.connected_machines.size() > 0) this.connected_machines.clear(); ArrayDeque<BlockPos> toSearch = new ArrayDeque<>(); HashSet<BlockPos> scanned = new HashSet<>(); if(toSearch.isEmpty() || toSearch.peek() == null) this.getBlocksToScan(toSearch, scanned, this.getPos()); BlockPos current = null; while(toSearch.peek() != null) { current = toSearch.pop(); scanned.add(current); TileEntity tile = this.getWorld().getTileEntity(current); if(tile != null) { if(tile instanceof TileEntityPipeEnergy) this.getBlocksToScan(toSearch, scanned, current); else if(tile instanceof TileEntityPipeTransferEnergy) this.connected_machines.add(current); } } } private void getBlocksToScan(ArrayDeque<BlockPos> toSearch, HashSet<BlockPos> scanned, BlockPos pos) { if(!scanned.contains(pos.north())) toSearch.add(pos.north()); if(!scanned.contains(pos.south())) toSearch.add(pos.south()); if(!scanned.contains(pos.west())) toSearch.add(pos.west()); if(!scanned.contains(pos.east())) toSearch.add(pos.east()); if(!scanned.contains(pos.up())) toSearch.add(pos.up()); if(!scanned.contains(pos.down())) toSearch.add(pos.down()); } public void informNetwork() { this.connected_machines.forEach(pos -> { TileEntity tile = this.getWorld().getTileEntity(pos); // make sure the tile entity at 'pos' is really the one we think it is if(tile != null && tile instanceof TileEntityPipeTransferEnergy) { TileEntityPipeTransferEnergy transfer = (TileEntityPipeTransferEnergy) tile; transfer.shouldRecalculate = true; } }); } } I somehow think I learned with this one topic here more than in most other topics I created.
  5. Nothing more to it? Somehow it sounds way too simple.
  6. Could you explain it to me as I don't quite get it after reading this JavaDoc? (with seems to contain not much information compared to the like 90% documentation and 10% code stuff from some Java classes)
  7. Thx. What does this Pair code do? (Pair.of and Queue<Pair<BlockPos, EnumFacing>>) And why do I have to change there the ArrayDeque to Queue<Pair<BlockPos, EnumFacing>>, I mean, what's the difference there, because there is also a HashMap which stores all that stuff in the main class itself. So why not change the toSearch to HashMap ?
  8. Well, ArrayDeque makes in this case even more sense than a normal ArrayList, as it provides some methods which directly allow to get an object and remove it from the list and it makes sure that the first added object get's checked first and not maybe never as the list grows and grows and grows. Well, when each object is linked to each other the list can grow huge and so it makes sense to actually handle the first added thing first. Ah, ok. So the BiConsumer is the thing that allows me to do this stuff: (key, value) -> I better do not ask how this whole BiConsumer stuff actually works. ^^ So, now I'm stuck with the findTransferPipes method. I mean, I somehow have to get the direction in which the current search goes there to save the direction (or maybe the opposite direction?) from which the cable comes to the connected map.
  9. Hm... The target type of this expression must be a functional interface. How should this statement be implement into the loop? Thought this way it works: for(Map.Entry<BlockPos, EnumFacing> pos : connected.entrySet()) {
  10. Well, a Map comes up with the problem that I can't just loop through it so easy as I am doing it now and how can I get the position from the HashMap? final TileEntity tile = this.getWorld().getTileEntity(pos); boolean flag1 = true; for(EnumFacing order : EnumFacing.VALUES) { IEnergyStorage storage = tile.getCapability(CapabilityEnergy.ENERGY, order); if(storage != null) { storage.receiveEnergy(this.container.extractEnergy((int)(10 / this.connected.size()), false), false); flag = true; flag1 = false; break; } } if(flag1) { IEnergyStorage storage = tile.getCapability(CapabilityEnergy.ENERGY, null); if(storage != null) { storage.receiveEnergy(this.container.extractEnergy((int)(10 / this.connected.size()), false), false); flag = true; break; } } Well, these methods are required so that my cable can scan through the network for all transfer pipes it is connected to and when it get's removed, it can inform those transfer pipes with just accessing their boolean value (not sure if this is the best way). Oh, didn't know those things. Thanks.
  11. Whats so terrible about LinkedList? And I just thought it would make sense to use something like a linked list because each object is linked to each other. So it might be that it's actually totally useless to use anything like that there. Why should the scanned list be a Set? It's just the same as the toSearch list and was added to make sure the block was not scanned yet, so that I don't scan stuff twice. Hm... don't ask me why I haven't done this and actually did it just 3 lines below. Well, I thought it would be a good idea as a block has methods like onBlockAdded and breakBlock while I don't know any equivalent method for tile entities. changed. Now it updates only when the list gets updated or when the tile entities energy gets updated [...] storage.receiveEnergy(this.container.extractEnergy((int)(10 / this.connected.size()), false), false); flag = true; [...] Why do I want to call getCapability with side null? I'm currently just checking all sides for the capability as it might be that not all sides have one, like a solar panel which has only the energy capability for the EnumFacing.DOWN side. Besides of that, I've also done it because I just don't know how the transfer pipe A knows about the side the cable is connected to the transfer pipe B. If I would know this I can even remove this for loop.
  12. Ok, I've just finished the new code, here it goes: The transfer pipe for sending and receiving energy: public class TileEntityPipeTransferEnergy extends TileEntityEnergy { //private Map<BlockPos, Integer> connected_weight = new HashMap<>(); // with pre-calculated weight, no clue how to do this... :( private Set<BlockPos> connected = new HashSet<>(); // without pre-calculated weight public boolean shouldRecalculate = false; public TileEntityPipeTransferEnergy() { super(10, 10); this.container.setTransferMode(EnergyTransfer.PRODUCER); } @Override public void update() { if(this.shouldRecalculate) { this.shouldRecalculate = false; this.findTransferPipes(); } Iterator<BlockPos> it = connected.iterator(); while(it.hasNext()) { final TileEntity tile = this.getWorld().getTileEntity(it.next()); for(EnumFacing order : EnumFacing.VALUES) { IEnergyStorage storage = tile.getCapability(CapabilityEnergy.ENERGY, order); if(storage != null) { storage.receiveEnergy(this.container.extractEnergy((int)(10 / this.connected.size()), false), false); break; } } } this.markDirty(); } private void findTransferPipes() { if(this.connected.size() > 0) this.connected.clear(); LinkedList<BlockPos> toSearch = new LinkedList<>(); LinkedList<BlockPos> scanned = new LinkedList<BlockPos>(); scanned.add(this.getPos()); if(toSearch.isEmpty() || toSearch.peek() == null) this.getBlocksToScan(toSearch, scanned, this.getPos()); BlockPos curScan = null; while(toSearch.peek() != null) { curScan = toSearch.poll(); scanned.add(curScan); if(this.getWorld().getTileEntity(curScan) instanceof TileEntityPipeEnergy) // check cable connection this.getBlocksToScan(toSearch, scanned, curScan); else if(this.getWorld().getTileEntity(curScan) instanceof TileEntityPipeTransferEnergy && !this.getPos().equals(curScan) && !scanned.contains(curScan)) this.connected.add(curScan); // found end of line } } private void getBlocksToScan(LinkedList<BlockPos> toSearch, LinkedList<BlockPos> scanned, BlockPos pos) { if(!scanned.contains(pos.north())) toSearch.add(pos.north()); if(!scanned.contains(pos.south())) toSearch.add(pos.south()); if(!scanned.contains(pos.west())) toSearch.add(pos.west()); if(!scanned.contains(pos.east())) toSearch.add(pos.east()); if(!scanned.contains(pos.up())) toSearch.add(pos.up()); if(!scanned.contains(pos.down())) toSearch.add(pos.down()); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); this.container.deserializeNBT(compound.getCompoundTag("Energy")); } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { compound.setTag("Energy", this.container.serializeNBT()); return super.writeToNBT(compound); } @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { super.onDataPacket(net, pkt); this.readFromNBT(pkt.getNbtCompound()); } } The cable for just beeing there and give the player the illusion to transfer the energy public class BlockCable extends Block /*implements ITileEntityProvider*/ { private Set<BlockPos> connected = new HashSet<>(); // connection to transfer pipes public BlockCable() { super(Material.IRON); this.setHardness(1.5f); this.setResistance(0.f); this.setCreativeTab(ModCreativeTabs.mcpowerTab); } @Override public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) { super.onBlockAdded(worldIn, pos, state); this.findTransferPipes(worldIn, pos); } private void findTransferPipes(World worldIn, BlockPos pos) { if(this.connected.size() > 0) this.connected.clear(); LinkedList<BlockPos> toSearch = new LinkedList<>(); LinkedList<BlockPos> scanned = new LinkedList<BlockPos>(); scanned.add(pos); if(toSearch.isEmpty() || toSearch.peek() == null) this.getBlocksToScan(toSearch, scanned, pos); BlockPos curScan = null; while(toSearch.peek() != null) { curScan = toSearch.poll(); scanned.add(curScan); if(worldIn.getTileEntity(curScan) instanceof TileEntityPipeEnergy) // check cable connection this.getBlocksToScan(toSearch, scanned, curScan); else if(worldIn.getTileEntity(curScan) instanceof TileEntityPipeTransferEnergy && !pos.equals(curScan) && !scanned.contains(curScan)) this.connected.add(curScan); // found end of line } } private void getBlocksToScan(LinkedList<BlockPos> toSearch, LinkedList<BlockPos> scanned, BlockPos pos) { if(!scanned.contains(pos.north())) toSearch.add(pos.north()); if(!scanned.contains(pos.south())) toSearch.add(pos.south()); if(!scanned.contains(pos.west())) toSearch.add(pos.west()); if(!scanned.contains(pos.east())) toSearch.add(pos.east()); if(!scanned.contains(pos.up())) toSearch.add(pos.up()); if(!scanned.contains(pos.down())) toSearch.add(pos.down()); } @Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { super.breakBlock(worldIn, pos, state); this.recalculate(worldIn); this.findTransferPipes(worldIn, pos); } private void recalculate(World worldIn) { Iterator<BlockPos> it = this.connected.iterator(); while(it.hasNext()) { TileEntityPipeTransferEnergy tile = (TileEntityPipeTransferEnergy) worldIn.getTileEntity(it.next()); if(tile != null) tile.shouldRecalculate = true; } } @Override public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos pos, EnumFacing side) { return super.isSideSolid(base_state, world, pos, side); } @Override public boolean canBeReplacedByLeaves(IBlockState state, IBlockAccess world, BlockPos pos) { return false; } /*@Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityPipeEnergy(); }*/ } So, I hope this attempt is better. @diesieben07 The code hopefully includes everything you said, even if I'm not quite sure about the performance gain from this code. Just to notice, I wasn't able to get the pre-calculated weight done as I'm not quite sure how to do it. I also have no clue why a cable needs a tile entity with the system you explained.
  13. It is under the .gradle folder of my project as I've got multiply gradle projects for different things.
  14. Hi, I've got some problems signing my jar with gradle: This mapping 'snapshot_20170405' was designed for MC 1.11! Use at your own peril.This mapping 'snapshot_20170405' was designed for MC 1.11! Use at your own peril. FAILURE: Build failed with an exception. * Where: Build file 'P:\ForgeMods\build.gradle' line: 102 * What went wrong: A problem occurred evaluating root project 'ForgeMods'. > Could not get unknown property 'keyStore' for root project 'ForgeMods' of type org.gradle.api.Project. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 2.244 secs task signJar(type: SignJar, dependsOn: reobfJar) { onlyIf { project.hasProperty('keystore') } keyStore = project.keyStore // line 102 alias = project.keyStoreAlias storePass = project.keyStorePass keyPass = project.keyStoreKeyPass inputFile = jar.archivePath outputFile = jar.archivePath } I've got also a file gradle.properties direclty under the '.gradle' folder which specifies my arguments keyStore=XXXX.gpg keyStoreAlias=XXXX keyStorePass=XXXX keyStoreKeyPass=XXXX Note, the 'XXXX' stuff is just a placeholder for this forum topic. Thx in advance. Bektor
  15. Well, the transfer pipe knows the location of all other transfer pipes and just teleports the energy to them while making sure that everything is connected via cable. But besides that, I'm wondering where to cache all the data efficiently and how to let the transfer pipe know when a cable is disconnected or connected.
  16. Well, problem is: I've got totally no idea how A* can help me with this problem efficiently. The only situation I can image where A* is of use and efficient is path finding for an AI. And when I would implement it, wouldn't it result into something similar I've already got?
  17. Hm, how can I pre-calculate the weight for each machine with the cable length? And what would be the best way to store this data (the first thing I would come up with is a HashTable, but not so sure if this is optimal there). And how can I notify a machine when the cable is broken? I mean, currently it doesn't even know to which machines it is connected to and to just move the scan code over into the cable wouldn't gain me anything performance wise. When building a network of cables it would make it even worse.
  18. Hi. I'm currently working on some basic cables. I want those cables to work the way that the TileEntityPipeTransferEnergy transfers the energy from TileEntityPipeTransferEnergy A to B. The transfer pipes should be connect with some cables, but the energy should not go through these cables. So actually, the energy goes directly from point A to B while skipping all cables along the way. This should however only work when point A and B are connected with a cable. I think Extra Utilities 1 back in 1.7.10 worked also that way, thought not quite sure. Down below I've got my first attempt at doing this, which hasn't been tested yet. My question is know, where and how can I optimize this code to run with maximum possible performance to be able to have huge machine rooms without huge performance drops (like running MC with 120fps, going into the machine room, MC drops down to 20fps and stuff like that (not only the fps)). How the code currently works: check every 20 ticks the whole network to be sure the cables are still there, for that, check every direction and add checked positions to a list and positions to be checked to a second list, if all possible endings (it might be possible one cable connects 3 or more transfer pipes) are found, stop the scan get the capability and send to every transfer pipe the amount of energy this transfer pipe stores divided by the number of transfer pipes energy should be send to Things to note: TileEntityPipeTransferEnergy -> transfer pipes TileEntityEnergy -> base class which creates an Energy Storage for Forge Energy, called container using a wrapper class which differences between producer, consumer and holder just like Tesla (not fully implemented, thought); extends TileEntity implements ITickable TileEntityPipeEnergy -> the cable, currently no code in there; extends TileEntity (I think there isn't even a use for it being a tile entity, but I haven't changed it yet, in the past it had to be a tile entity, but no longer has to be) public class TileEntityPipeTransferEnergy extends TileEntityEnergy { private byte counter = 0; private ArrayList<BlockPos> connect = new ArrayList<>(); private ArrayList<BlockPos> copy = new ArrayList<>(); public TileEntityPipeTransferEnergy() { super(10, 10); this.container.setTransferMode(EnergyTransfer.PRODUCER); } @Override public void update() { boolean flag = false; ++this.counter; if(this.counter > 20 || this.counter < 0) this.counter = 0; if(this.counter == 20) { flag = true; this.findTransferPipes(); } for(int i = 0; i <= this.connect.size(); i++) { flag = true; if(this.copy.contains(this.connect.get(i))) continue; final TileEntity tile = this.getWorld().getTileEntity(this.connect.get(i)); for(EnumFacing order : EnumFacing.VALUES) { if(!tile.isInvalid() && tile.hasCapability(CapabilityEnergy.ENERGY, order)) { IEnergyStorage storage = tile.getCapability(CapabilityEnergy.ENERGY, order); if(storage != null) { this.copy.add(this.connect.get(i)); storage.receiveEnergy(this.container.extractEnergy((int)(10 / this.connect.size()), false), false); break; } } } } if(flag) this.markDirty(); } private void findTransferPipes() { if(this.connect.size() > 0) { this.connect.clear(); this.copy.clear(); } LinkedList<BlockPos> toSearch = new LinkedList<>(); LinkedList<BlockPos> scanned = new LinkedList<BlockPos>(); scanned.add(this.getPos()); if(toSearch.isEmpty() || toSearch.peek() == null) this.getBlocksToScan(toSearch, scanned, this.getPos()); BlockPos curScan = null; while(toSearch.peek() != null) { curScan = toSearch.poll(); scanned.add(curScan); if(this.getWorld().getTileEntity(curScan) instanceof TileEntityPipeEnergy) // check cable connection this.getBlocksToScan(toSearch, scanned, curScan); else if(this.getWorld().getTileEntity(curScan) instanceof TileEntityPipeTransferEnergy && !this.getPos().equals(curScan) && !scanned.contains(curScan)) this.connect.add(curScan); // found end of line } } private void getBlocksToScan(LinkedList<BlockPos> toSearch, LinkedList<BlockPos> scanned, BlockPos pos) { if(!scanned.contains(pos.north())) toSearch.add(pos.north()); if(!scanned.contains(pos.south())) toSearch.add(pos.south()); if(!scanned.contains(pos.west())) toSearch.add(pos.west()); if(!scanned.contains(pos.east())) toSearch.add(pos.east()); if(!scanned.contains(pos.up())) toSearch.add(pos.up()); if(!scanned.contains(pos.down())) toSearch.add(pos.down()); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); this.container.deserializeNBT(compound.getCompoundTag("Energy")); } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { compound.setTag("Energy", this.container.serializeNBT()); return super.writeToNBT(compound); } @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { super.onDataPacket(net, pkt); this.readFromNBT(pkt.getNbtCompound()); } } Also, besides performance, anything else you notice, just post it. Open for feedback of every sort to this code (and I'm sure in nearly every line things can be changed to get better performance etc.), I mean, without feedback you won't learn anything. Thx in advance. Bektor EDIT: Updated code: EDIT 2: Again updated code: EDIT 3: Updated Code + some problems:
  19. If you don't have the oppurtunity to learn programming in school, I would recommend reading books. There are quite a few good books on amazon to learn languages like C++ and Java. But books alone won't do it, it comes also with a lot of practice.
  20. Hi, I'm wondering how I can transfer energy from a producer to a consumer via a cable. public class TileEntityCable extends TileEntity implements ITickable { // kind of wrapper for Tesla and ForgeEnergy, extends EnergyStorage from Forge, no methods added public final EnergyManager container; public TileEntityCable() { this.container = new EnergyManager(1, 1); // capacity 1, maxReceive and maxExtract 1 } @Override public void update() { boolean hasUpdated = false; if(this.hasWorld() && !this.world.isRemote) { hasUpdated = true; final TileEntity tileEntity = this.getWorld().getTileEntity(this.getPos().offset(EnumFacing.DOWN)); // TODO all other directions if(tileEntity != null && !tileEntity.isInvalid()) { this.container.extractEnergy(10, false); // TODO } } if(hasUpdated) {// save changes to disk IBlockState state = this.getWorld().getBlockState(this.getPos()); this.getWorld().notifyBlockUpdate(this.getPos(), state, state, 3); this.markDirty(); } } // TODO: getCapability & hasCapability } My problems: searching for a better way to handle all directions How can I transfer energy from a producer like a Solar Panel into cable a which links to cable b and c and from cable c into the consumer, for example an electric furnance. Ok, found a solution: this.container.receiveEnergy(storage.extractEnergy(1, false), false); Thx in advance. Bektor
  21. Ah, ok. Thx. When looking at your implementation, I'm wondering what makes EnderIO so much more complicated.. I mean, there has to be an advantage (and disadvantage). Would be nice if someone is able to explain how the EnderIO system works (as I'm totally lost when looking into it, even with just the bare minimum of energy system classes) with the advantages and disadvantages. So that I would be able to know more than one possible way of doing things and the differences to come up with the best implementation for what I am planning.
  22. @Mr. Flamegoat HTTPS would be nice. Firefox always warns me about missing HTTPS on this site. Well, Chrome and Vivaldi also do, just not on the login field. The next thing: Inserting an image from URL seems not to work well in Vivaldi (version 1.8, so the latest). I mean, you click on the "Insert to post" button and nothing happens or it just takes that long that I assume nothing happens. Not quite sure, but as everyone can see, worked the third time. ^^ Some progress bar or loading bar stuff would be nice there, so if it takes somehow longer you can see that the website is doing something.
  23. Hm, ok, after looking into the code... I've got no clue how this could work with energy systems.
  24. Where can I find invWrapper?
  25. Hi, I'm currently struggling with the hole energy system stuff. I've worked myself so far into the Capabilities that I can work with the Tesla Energy system and Forge Energy system and I know that mods who support both have some kind of internal energy. My problem now is that I've got no idea how I can combine all the pieces of Forge Energy and Tesla Energy together, so that my machines can work with boths. And I definitly don't want to have thousands of lines twice just because if-else cases for checking the which energy system is used and stuff like that, because that would be very inefficient. Before someone now says, look into EnderIO because it does those things: I know that EnderIO has exectly what I want, that machines can support both energy systems, but even after looking into the forge docs and into the source code 20 times... I just don't understand why it is done there in that way and for what some of those methods are.... So I hope there is someone who can help me with getting all those pieces together. Thx in advance. Bektor
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.