Jump to content

Cerandior

Members
  • Posts

    385
  • Joined

  • Last visited

Everything posted by Cerandior

  1. That was the problem, I couldn't run the command without installing the proper gradle version beforehand. I don't know why. EDIT: It's highly likely I wasn't executing the command properly. Thank you, moved over to the latest build for 1.14 and it is working fine now.
  2. Ok, so I managed to generate the runs by downloading version 4.10 of gradle. Running gradle wrapper command at the folder of my project, then ./gradlew genIntellijRuns However, now when I try to run the game in IntelliJ I am getting this error: Does it have to do anything with the java version?
  3. Okay so getting some specific details out first: Linux OS: Manjaro 19.0.1 XFCE Java Version: openjdk version "1.8.0_242" Gradle Version: Gradle 6.1.1 So what is the problem? Well, I have my dev environment already set up on Windows. I just recently installed Manjaro on dual boot with Windows on my machine as I needed Linux for some other (uni) projects of mine. I like to delve into minecraft modding from time to time as a fun way of practicing my (newly acquired) java knowledge. Because I am spending a lot of time in Linux at the moment because of the other projects, I decided to set up the dev environment here as well so I don't have to keep switching between Windows and Linux just to do some minecraft modding. I thought it wouldn't take me long. Just cloned my github repo into some folder, imported the project in intellij through the build.gradle file and so far so good. Now at this point in Windows, you just run gradlew genIntellijRuns in the intellij terminal (you can probably use powershell too) and you are ready to go. In Linux, I wasn't able to do that because the gradlew command was not being recognized. I tried running that through the System's terminal as well and gave me the same error. I also tried to run the command with the gradlew file that is present in the project directory like this: ./gradlew genIntellijRuns however that gave me another error: So I did some "research" online, and apparently you have to build the gradle wrapper? I really don't know what gradle is, or what the gradle wrapper is because I have never had any experience with it outside minecraft modding. Even here, although it might be an essential part of the project, it is barely touched on by the developer apart from building the project so I never felt the need to look for more information related to it. Anyway, I installed gradle on my Linux, headed over to the terminal again, navigated to my project folder and ran gradle wrapper to build the wrapper. This initially seemed to work, however it didn't. It ended up giving me this error: So I am assuming, I can't build the wrapper with my installed gradle version because the forge gradle version is seemingly older? Do I have to find another version for gradle now, or is there something I can modify inside build.gradle that can fix this problem? Thank you in advance.
  4. I personlly used debug mode to see what's going on. Can't really get anything else for visualization.
  5. So after more experimenting I noticed that the server has the right information about the empty slots in the inventories connected in the multi-block, however the client does not. I simply filled up the chests manually, and I noticed that the value of the empty slots did not change in the client. https://prnt.sc/r48reg The numbers in the image represent the number of empty slots available in the multi-block, and as you can see the client and the server have different values on that. How can I update the client data?
  6. In 1.14 you override setRotationAngles and you animate your entity by changing the rotateAngleX, Y and Z of your different RendererModel components of your model. Example: https://github.com/arjolpanci/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/client/models/SkeletonKingModel.java Look at the end of the file.
  7. I don't think that is the case because as I mentioned before, all of those empty slots are non-functional. It's not about 1 or 2.
  8. The whole thing is a mess really. The more I play around with it the more things I find that are wrong. I think the problem is at the part I get the item and empty slots of the inventories connected to it. I checked and the multi-block recognizes the inventories connected to it properly. Checked with various inventory blocks like a shulker box, chest, double chest. Doesn't matter, it always finds the correct inventories / tiles connected to it. Is there anything blatantly wrong in this code? (getInventories() returns an arraylist of the connected inventories in the multiblock. As I mentioned before it is accurate and I don't think the problem is there) for(IInventory i : getInventories()){ for(int j=0; j<i.getSizeInventory(); j++){ Slot slot = new Slot(i, j, 0, 0); if(slot.getStack().isEmpty()){ emptySlots.add(slot); continue; } itemSlots.add(slot); } }
  9. It's not about the concept of scrolling, it's about making it happen with slots in an inventory on minecraft. To make it visually appealing, you have to make it so when you scroll, you scroll row by row. I did that, however I am having trouble with the handling of those inventories. Because my tile doesn't have its own inventory, it actually has to work with the inventories that are connected to it through a multi-block. Now I am not having any trouble with with the slots that fit within the gui initially, I can manipulate those slots fine. I am having problems with the slots that appear after you scroll.
  10. Okay the scrolling is smoother now, I changed the "mapping" function a bit, so problem 1 is solved. I tried looking at widgets of Minecraft GUI, and could only find the sliders they use for the options so I don't think I can use those in this gui. So problem 3 remains yet. And the biggest problem is problem 2, because this is not functional in this state. I did some experimenting and it seems like the slots appear empty in the gui, you can put items in it, but then they become duplicate slots of already existing item slots. You can take these out and it will update everything next time you open the gui again (so you can't duplicate items), however the empty slots of the inventories that are outside of the gui viewing range are purely visual since they are not really the actual slots. Updating them doesn't update the contents of the chest because as I said, as soon as you put an item in them they turn into duplicate slots of already existing slots. So whatever item you put in them, even if they appear as a different item, as soon as you force an update they turn into whatever item was stored in those slots. Why is this happening? Does it have to do with the way I am handling the scrolling, or is the problem related to the way I assign these slots in StorageBlock Class.
  11. I am trying to make a multiblock in which you connect inventories together to a controller block through pipes. Then from that controller block you can manipulate all of those inventories. Now obviously, for big structures, I would need to have a scroller to be able to go through each of the slots that the inventories connected have, however I am having some nasty problems with it. I don't have problems when connecting two single chests or a double chest, however when I connect another one (when I have to use the scrollbar), various problems arise. 1 - It seems like my "mapping" function is not accurate and I can't pinpoint why. I am taking the scrollbar position and mapping it between 0 and inventory size in this function and I use that value to update the slots of the container. The problem is that I can keep scrolling even when my inventory has ran out of slots, even though it shouldn't do that, so it doesn't seem like it is working properly. I feel like the math is correct. I am taking a percentage value to show at which % of the full scroll range my scrollbar currently is and I am then multiplying that value with the number of slots in the inventory (inventory size). And that's the value I return. Can't really spot the problem here. 2 - When connecting 3 single chests, initially, the empty slots of the new chest show up when you scroll at that position, however I can't update these slots. I put items in it, they show up in the gui, but not at the chest itself. I think they become duplicate slots of the currently existing slots of the double chest, and again I am not sure why. 3 - The last problem I have is purely visual. I can't seem to find the scrollbar GUI component and I made mine out of a button. It looks really ugly. Does anyone know what GUI component vanilla uses for the creative screen scrollbar? A short gif explaining the problem: Related classes (If you wish to check another thing, please ask or simply navigate in the repository) 1) StorageBlock Class: https://github.com/arjolpanci/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/blocks/StorageBlock.java 2) CollectiveStorageContainer Class: https://github.com/arjolpanci/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/container/CollectiveStorageContainer.java 3) CollectiveStorageScreen Class: https://github.com/arjolpanci/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/client/gui/CollectiveStorageScreen.java Thank you in advance!
  12. If one of the tile entity data fields contains one of your classes for example. I don't think you can save that using NBT. About the incompatibility, can't really think of anything that can be harmful myself, that's why I asked.
  13. I don't need any help with anything specific per se but for the sake of discussion, would want to ask something. Is it a bad idea to store data for a (example) tile entity in another file and not in the world.dat (or whatever is called)? If I have some data that is not compatible with NBT, can I use my own files / way of saving that data? Would that be bad for performance and compatibility?
  14. registerEntityRenderingHandler takes a class and a factory for me in 1.14. I guess it has changed for 1.15, I am not familiar with it. It seems like you have followed Cadiboo tutorials, maybe if he sees it he can give you some help.
  15. Ok, whatever. It might actually be an issue with your Renderer and not the model class. Where do you register your renderer for your entity? Post all the classes related to Renderers, and also post your main class.
  16. I don't know if it is within your rights (because of mojang copyright), but I think it shouldn't be a big problem just for one class. Could you open the ModelRenderer class for 1.15 and upload it somewhere like gist or pastebin so I can have a look?
  17. Use debugger and see what is null. I don't have a 1.15 dev environment, I am afraid I can't give much help. Also doesn't tabula set the rotation points for you? It should also add the boxes to your ModelRenderer. This is what a full model looks like in 1.14: https://github.com/arjolpanci/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/client/models/SkeletonKingModel.java
  18. I don't really think that is any different from the setSize. Thank you, It's fixed now. Next time I'll look more carefully before asking for something here. I did open up the AbstractGui class to look into the blit method, but when I saw a bunch of meaningless variable names I stopped looking.
  19. I called setSize in the constructor and gave it 512 for both width and height but nothing changed. Also I remember that a couple of years ago you couldn't have large GUI's because they were hard-coded to only accept 256x256 images. You had to use a tessellator and draw it yourself. Does that limitation still exist nowadays?
  20. My gui is a little big to fit in the standard 256x256 size, so I made a 512x512 texture for it. However now the gui is scaled down by minecraft and it's being tiled. See here: https://prnt.sc/r2f61q The xSize and ySize are set correctly. Does this have to do with the way drawGuiContainerBackgroundLayer scales the gui depending on the window size? Container: https://github.com/arjolpanci/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/container/CollectiveStorageContainer.java Screen: https://github.com/arjolpanci/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/client/gui/CollectiveStorageScreen.java
  21. Also, one more question. Do double chests share a single large inventory, or are they considered as two separate inventories?
  22. Firstly, why the hell are you writing into a file to check if your item is an instance of BowItem or not. Your item is actually created as a new instance of BowItem, so a check is not necessary at all here, yet if you would want to, just use a println. As for your problem, are you sure your entity extends from AbstractSkeletonEntity Also, I don't know if you think you are doing anything at setCombatTask and attackEntityWithRangedAttack but if you do, you aren't actually doing anything at all there, so might as well not override them.
  23. I am currently trying to make a multi-block structure for handling storage. Basically you connect things that have inventories with pipes to a controller block, and then through this block you can access all of those inventories at once. The problem that I have right now, is that I obviously need to accommodate a huge number of slots in this gui, so a slider is the obvious choice. However I am not entirely sure how would I implement this. I have an idea, but I don't like it because it doesn't seem very efficient. I was thinking of using the slider as some sort of "offsett" applier, and depending on this offset I reload the slot contents into the gui to the appropriate chests/inventories. Now that would mean that every time I change this slider value I am essentially removing and re-assigning slots to the container, and that doesn't seem like a good idea if there are a lot of inventories connected to this block. I also had another idea but I am not sure this one is possible. I was thinking about adding all the slots at the beginning and using the slider offset value as a "guide" on which part of the gui to render. Can you do that? The next choice, which is also the easiest one, is to create "pages" of slots and I can use two buttons to navigate through them, but I don't like the aesthetic of this solution. Could someone offer some help with the slider?
×
×
  • Create New...

Important Information

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