-
Posts
103 -
Joined
-
Last visited
Everything posted by GloriousAlpaca
-
[1.12.2] Itemstack information is not updated [SOLVED]
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
I'll just make a seperate capability. Thanks! -
[1.12.2] Itemstack information is not updated [SOLVED]
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Oh, thank you! Where should I save the timer int then ? Or rather how should I time the method ? -
[1.12.2] Itemstack information is not updated [SOLVED]
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Thank you very much! -
[1.12.2] Itemstack information is not updated [SOLVED]
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
How can I use the NBT share tag (or where can I see an example of it being used)? Thank you very much. -
[1.12.2] Itemstack information is not updated [SOLVED]
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
The Item is supposed to be for crafting: You charge it in a machine after which you need to supply it with energy to keep it from exploding. You can craft things with the void stored in it. The capacity is useless I can see that, however the timer integer is for slowly reducing the energy stored or am I doing something wrong ? I don't think it did when I tested it. I thought it's called when the item is crafted, is it not ? You're right I could just save the value in the energy capability. The onRightClick Method is only temporarily there for me to test things. Thank you! -
Hello, I have made an item with the energy capability, a custom description showing the currently stored energy and a durability bar that also shows the stored energy. Sadly however the information of the itemstack is only set on the creation of a new itemstack, so the durability bar just stays the same even if the energy changes. That also applies if I put my item in something like an energetic infuser by thermal expansion: It just gives out an item with a full durability bar after a while. This is the Code of my item: https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/item/ItemTrap.java Thank you for your help!
-
[1.12.2] Potential Memory leak detected
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Well it seems to be working now but what would I ideally do instead of: if(!message.valid && ctx.side != Side.CLIENT) return null; Minecraft.getMinecraft().addScheduledTask(() -> processMessage(message,ctx)); -
[1.12.2] Potential Memory leak detected
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Well the Packet is only sent to the client so that shouldn't be a problem right ? There's also a check right before that as to not call that method on the server. That's true, I'll try that. Thank you! -
Hello, for some reason all of my Packets are leaking. This is the Code of my Packet: https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/network/VoidcomReturnMessage.java I have used nearly the same code in another class and there it is working fine. The progress and energy variables do have the right values, however the processMessage() method does not work. Thank you for your help.
-
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
I thought the ResourceLocation already was a registry name thank you. -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Everything except the soundevents are working now! This is the crash I get when I register the soundevents: -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Sorry to bother you again, however now my items are not appearing in-game. I have updated the github repository if you would like to take a look. -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Thank you so much! Everything should be correctly set up now. -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
I am not sure if I have understood this correctly but I tried using the ObjectHolder Annotation: This is the ItemHolder class: -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Okay so should I just rename it to serverproxy ? Would this be okay then (I have not removed ItemBase yet): Again thank you very much! -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Well surely I won't need to buy a domain ? I'll just drop the com then. About Issue 1: So I can just safely delete the commonproxy class? Issue 2: Could you tell me where I did not use @Override ? Is the class InitItems as a whole considered static or is it just the registerModels method? Also I can't seem to find the event for registering tile entities. I would like to change the blockstate based on whether an item is inserted or not. Yes I was testing something, originally I was checking for the unlocalized name, but I assume this is bad practice. Should I rather check for the registry name ? Okay so I am supposed to first extract the ItemStack, then modify it and lastly insert it again ? Thank you very much for taking your time to help me, this has been incredibely useful and I am very sorry for making such common errors. -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Okay here you go: https://github.com/GloriousAlpaca/Leer I'm not used to using github, so let me know if there are any github related errors! -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Okay I will make one. -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
For some reason my gui packet is no longer working since I made them non-static ? -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
When I say "not saved" I mean that if I close the gui the itemstack in slot 0 is gone. -
[1.12.2] Container not saving content
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
First of all thank you for the advice! My problem is that when I close the gui the content of the slot is not saved everytime. It is however sometimes saved, if I wait long enough and I think that has something to do with changing the progress variable, as when I removed the part I marked(in the tile entity class) the itemstack was not saved anymore. -
Hello, my container is exhibiting some weird behaviour: The itemstack inside is not saved if I close the gui, if however my code reaches a certain point (I have marked it with a comment) then the itemstack is saved normally. My Code: Container: The Gui: The Tile Entity(Code is marked here): Thank you for your help!
-
[1.12.2] Raycast shifting 1 Block to center of the world
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
Well okay then I'll just use the loop. Thank you very much! -
[1.12.2] Raycast shifting 1 Block to center of the world
GloriousAlpaca replied to GloriousAlpaca's topic in Modder Support
I have used that for another block, I just wanted to try using raycasts once, however maybe it isn't the right application. How performance heavy are raycasts compared to just checking the blocks one by one ? -
Hello, I am trying to use the method rayTraceBlocks to see if my block can see the bottom of the world, however after approximately 11 Blocks of height (I say approximately as the distance has changed from time to time) the detected collision shifts 1 Block to the center of the world. If my block were for example at the position x: 4 y: 77 z: 0 the collision would be detected at x: 3 y: 55 z: 0 shifting 1 Block in the direction of the world center. This is the Code of my raycast (-100 is just a test value): Thank you for your help!