Everything posted by BeardlessBrady
-
[1.16.4] How does TrackIntArray work?
In terms of getting the tile from the openContainer I am not seeing any method or way to get a tile entity from openContainer. With my issue I initially was having the message just flip the value (if 0 set as 1, vice versa), then I was just messing around to see if I could get it working by only setting it to 1. Anyways I have it commented out here: https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/network/MessageVendingStateData.java#L54 But just tried it uncommented, and commenting out the other parts with no luck
-
[1.16.4] How does TrackIntArray work?
Alright. It seems that even if I send a packet from client to server to update it, it does infact update the server side but it isn't then sending the data back to the client end. https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingContainerScreen.java#L50 Although it is commented out, I have tried it not commented...with no luck
-
[1.16.4] How does TrackIntArray work?
Ok so it seems to sync if I set it on client or server in the CONTAINER but if I change it in the CONTAINER SCREEN it actually doesn't even seem to be going over to the client data in the container for some reason... For example: Using a button to change the value https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingContainerScreen.java#L49
-
[1.16.4] How does TrackIntArray work?
I moved my containers constructors around and now trackIntArray is called on both ends, it is still not working. https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingContainer.java#L95
-
[1.16.4] How does TrackIntArray work?
Hmm. I swear I do have the same reference holders on both sides, yet it isn't updating at all
-
[1.16.4] How does TrackIntArray work?
For some reason when I TrackIntArray onto a custom made IIntArray and the data changes in the IIntArray on the server it isn't updating the client. Is that now its supposed to work? Or do I manually have to edit DetectAndSendChanges? https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingContainer.java#L87
-
[1.16.5] Adding arguments to DeferredRegister and RegistryObject
Ok that makes sense. Last question: What format do I include data into the packetBuffer for the client? For instance if I want to include the BlockPos? https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingBlock.java#L51-L52
-
[1.16.5] Adding arguments to DeferredRegister and RegistryObject
What do you mean by "On the server you create your container in INamedContainerProvider"?
-
[1.16.5] Adding arguments to DeferredRegister and RegistryObject
I got the new way of registering things working. I want to send the tile entity through my container so I have access to the BlockPos in the container (for sending packets). I'm just not sure how, if I add the tile to the constructor of the container how do I add the tile to the register? https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/init/CommonRegistry.java
-
[1.16.5] StateData to ContainerScreen
I am trying to change some stateData via a button in the containerScreen. What is the best way to do that? Should I be using packets to send to the client whenever stateData is changed and back to the server when the client changes it?
-
[1.16.4] Null when OpenGUI
Ah.. Thats what I get for stopping half way through and not double checking, thanks!
-
[1.16.4] Null when OpenGUI
While trying to open a gui in my block my console returns with this error: https://pastebin.com/XNYzf9pe Its basically saying that something is null on line 51. I am checking if namedContainerProvider is null and its doubtful the player is null so that means the NetworkHooks is returning null? How does one fix that issue. Below is a link to the line the error is referring to: https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingBlock.java#L51
-
[1.16.4] Tile Registration
Ah there ya go! Thanks.
-
[1.16.4] Tile Registration
Hello, I am having issues registering my tile entity. Here is my code as well as a link to the code in my github. The IDE is complaining that 'TileEntityType.Builder.create' has invalid arguments // Tiles public static final DeferredRegister<TileEntityType<?>> TILE_ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, GOCurrency.MODID); public static final RegistryObject<TileEntityType<VendingTile>> TILE_VENDING = TILE_ENTITY_TYPES.register("vending_te", () -> TileEntityType.Builder.create(VendingTile::new, BLOCK_VENDING.get()).build(null)); https://github.com/Beardlessbrady/Currency-Mod/blob/95230ca4ee2d290b3e5f3ef81810a27f73137625/src/main/java/com/beardlessbrady/gocurrency/handlers/CommonRegistry.java#L42-L43
-
[1.16.4] Copying file from assets to config folder
I am trying to create a resource pack on mod load. I have everything but creating the default assets, Is there a way to grab an asset file and copy it to the config folder without going through the jar and copy/pasting it?
-
[1.16.4] Generating a resource pack on startup
Im looking to generate a resource pack on startup if it hasen't been generated before. There must be a way to generate files in the running environment as thats what the config files are. I assume its fileIO stuff but I am not sure if there is anything special to do it through forge and to get the resourcePack folder location.
-
[1.16.4] Creating Sub items through NBT from config
Oh, well that is great information! Thanks for the help.
-
[1.16.4] Creating Sub items through NBT from config
So is it possible to re fill the item group later on during the FMLCommonSetupEvent like you said?
-
[1.16.4] Creating Sub items through NBT from config
It seems even isolating it in the #fillItemGroup still has the config coming out null.
-
[1.16.4] Creating Sub items through NBT from config
Alright, I will abstain from doing any config stuff in the constructor.
-
[1.16.4] Creating Sub items through NBT from config
To make them appear in the creative menu?
-
[1.16.4] Creating Sub items through NBT from config
In 1.12 there was a way to make sub items through configs fairly easily. Im wondering if there is ANY alternative way to do this in 1.16.4?
-
[1.16.4] Creating Sub items through NBT from config
Hello, I am trying to create sub items through NBT by pulling information from the config file. My issue is that it seems like the items are being registered before the config is processed, is there a way to make the config get processed first? My Code for reference: https://github.com/Beardlessbrady/Currency-Mod/tree/master-1.16/src/main
-
[1.16.4] Getting values from config
Thanks, I finally got it through my thick skull
-
[1.16.4] Getting values from config
I know how to setup it up, I am just not understanding how to call on it from another class and read the values.
IPS spam blocked by CleanTalk.