Jump to content

Bektor

Forge Modder
  • Posts

    852
  • Joined

  • Last visited

Everything posted by Bektor

  1. Hi, I'm wondering how to read data in from an NBTTagList in Minecraft 1.11.2. Just to mention, I'm storing a HashSet in the NBTTagList, not sure if this is the best way to go. My current code: @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { NBTTagList list = new NBTTagList(); for(BlockPos pos : this.connected_machines) { NBTTagCompound com = new NBTTagCompound(); com.setInteger("posX", pos.getX()); com.setInteger("posY", pos.getY()); com.setInteger("posZ", pos.getZ()); list.appendTag(com); } compound.setTag("machines", list); return super.writeToNBT(compound); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); NBTTagList list = compound.getTagList("machines", type); } Thx in advance. Bektor
  2. Hm... I'm not quite sure how Windows has implemented such stuff, but the WatchService performance is OS dependent as it is quite low level code compared to normal Java: JavaDoc: But what I read about it, correctly configured the WatchService should not cause such performance issues, so maybe you configured something in the WatchServices wrong.
  3. After a bit of debugging: keyStore=P:\ForgeMods\\keystore.jks GPG which recommends the Gradle documentation for Gradle 3.5 does not work and without a '\\' Windows won't find it. Also I had the random problem that Windows tried to make out of P:\ForgeMods\\keystore.jks this here: P:\ForgeMods\\P:\ForgeMods\\keystore.jks I guess everyone sees that this won't work. Only a reboot of Windows had solved that problem (and I don't even know what caused it, just from one second to the other, windows put the path twice)
  4. So for example the generator "Solar Panel" has only the EnumFacing null for Waila etc. and the EnumFacing.DOWN so cables can get energy from it and you have to place the cables under the solar panel for it to work. Correct? And cables and machines like electro furnaces aren't using null.? I'm wondering why they're not likely to use null.
  5. Is your mod also installed on the server?
  6. Hm.. if I expose my Capability to null and non-null EnumFacing's, how can I prevent mods from receiving energy from the wrong side of my block? And yeah, I got my own implementation. Basically a wrapper class which is an instance of EnergyStorage and does this in getCapability for Forge Energy and Tesla: CapabilityEnergy.ENERGY.cast(energyStorage); But could you explain the ICapabilityProvider with some more details? As of I only know it provides the methods getCapability and hasCapability and that's all I know about it.
  7. If you want to learn it now and don't have any one to teach it to you etc., I would recommend you reading books and watching videos (if you can find some good videos). But even then, it takes a lot of time and research over the internet and self-training (and takes probably longer than with a good teacher). Book I learned with:
  8. Hi, I'm wondering if Energy Mods like EnderIO, ThermalExpansion, ExtraUtilities let the cables extract the energy from the generators or if the generators offer/send the cables energy. I'm just asking this so my generators are as compatible as possible. Thx in advance. Bektor
  9. Ah, ok thx. Just one question: What is the best way to get the energy stored from a block to show it with Waila / Hwyla? Because my blocks are using Telsa and Forge Energy, they are all Capability based? Besides, my solar panel for example only exposed the capability to the bottom, because why should it expose it to other sides if it should only be able to extract energy from the bottom. I am also wondering why this site states that information is only obtained using the side null and everything else handles it not correclty.
  10. Hi, I'm currently wondering how I can add Waila / Hwyla intregration to my mod: My blocks should basically be able to show via Waila / Hwyla the stored amount of energy and how much can be stored max. I also want to show the unit the energy is stored in, like if it is stored in Tesla or Forge Energy etc. My main problem is now: How can I achieve this easy without having to register the handler for each block which can store energy? In the methods from Waila / Hwyla itself, like getWailaBody I could just ask if the block is an instance of the base energy block, but as I have to register this handler, I don't know how to achieve this in the best way. Thx in advance. Bektor
  11. Basically about both. The last time I worked with both of them, I did everything completly without annotations. And thx for the answer.
  12. Well, from the .gradle folder: %homepath%\.gradle\caches\modules-2\files-2.1\ I don't wanna have there over 1GB of cached stuff just because this folder exists for some years now.
  13. Well, it doesn't delete the old versions when I'm running the eclipse task and it doesn't delete the old versions when I run the cleanEclipse command.
  14. Hi, I just saw the commit "Use the new @Config-compatible config GUI" on Choonster's TestMod3 and some threads about it here on the forum. Can someone explain to me how this system works? Thx in advance. Bektor
  15. Ah, ok, thx. Makes %homepath%\.gradle\caches\modules-2\files-2.1\mess.je But interesting, the whole .gradle folder there is over 1GB large with about 6-8 different Gradle versions. ^^ So, is there a way to delete those old dependencies automatically when a new dependencie has to be downloaded. I basically mean, when you update depencie A, the old one get's deleted and the new one downloaded but depencie B stays the same as it is not required to download any new version there.
  16. Hi, I've got a little problem. runDir = "../run/assets" deobfCompile "mezz.jei:jei_${config.minecraft_version}:${config.jei_version}:api" runtime "mezz.jei:jei_${config.minecraft_version}:${config.jei_version}" So I got those dependencies and updated them today. My problem is, gradle didn't deleted the old dependencies it seems and so I can't start Minecraft as I've got now twice the runtime dependencie. Does anyone know where Gradle saves these dependencies so I can delete the old version manually? I've already looked into the mods folder at "../run/assets/" but this folder is empty. Besides, to update the dependencies I've run this command: gradlew cleanCache setupDecompWorkspace --refresh-dependencies eclipse And is there any way to let gradle automatically delete those old dependencies? Thx in advance. Bektor
  17. Ah, ok. Didn't know that.
  18. And now null is a reference to a nothing EnumFacing. I hope it's not quite as complicated as it seems to be the case in C++ with references vs pointers. But quite interesting that no methods want a cast when there is null, but this method does. But why references, why not just some kind of pointer like nullptr in C++? (and even when Java want's to tell you that it does not has pointers, it has pointers ^^)
  19. Ah, ok. Thx. Seems a bit weird to cast null to EnumFacing as null is null. ^^
  20. And then add this to the for-loop in getBlocksToScan instead of EnumSet.allOf(EnumFacing.class), I guess. Also, I'm getting the following error when using your line of code at that line: The method concat(EnumFacing, EnumFacing[]) is ambiguous for the type ObjectArrays.
  21. Hm, so my pipe will ignore all machines with don't care about the side? How can I add then the null check effeciently again?
  22. Stacktrace when using jks files as your link used: Stacktrace when using gpg files as from before (which is actually the gradle doc using): Well, the wiki of ForgeGradle is really out of date. EDIT: (gradle.properties) [same problem when changing keystore.gpg to keystore.jks as the tutorial from the link is using) keystore keyStore=P:\ForgeMods\keystore.gpg keyStoreAlias=XXXXXX keyStorePass=XXXX keyStoreKeyPass=XXXXX
×
×
  • Create New...

Important Information

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