-
Posts
398 -
Joined
-
Last visited
Everything posted by BeardlessBrady
-
[1.16.4] Getting values from config
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
How do I get access to the config instance though? Since now you register your config via "ModLoadingContext.get().registerConfig" -
Hello, this is probably simple but I can't find any documentation on it. How does one get the values from their mod's config file?
-
[1.16.4] Multi option Config File element
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Alright I managed to figure it out. I had to set the config type from DoubleValue to ConfigValue<List<? extends Double>> and have the Predicate use an Object -
[1.16.4] Multi option Config File element
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
I am having a bit of trouble with the arguments. I created a predicate to validate the options but it is still invalid https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/handlers/ConfigHandler.java#L32-L38 It says 'Cannot Resolve Method' For the defineList method -
[1.16.4] Multi option Config File element
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Thanks! I figured but was trying something else because it seemed funky. I got it now! Thanks for pointing me in the right direction. -
Hello, is it possible to make a list of default values that can be added/removed from. I last modded in 1.12, which this was possible in. Example set in config of Currency values, user can add or remove values as they see fit and the config class will get an array ' "Currency Values" < 0.01 0.05 0.10 0.25 1 2 1 5 10 20 50 100 > '
-
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Thank you! that has done it -
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
I am trying to understand but it isn't very clear what I am supposed to put into the LazyOptional.of() method. If I place the instance of my capability I get the error stated above. As I mentioned I can get it working fine if a new instance doesn't require any parameters but mine does because it's a chunk capability. Can someone just help me understand what I need to do with my instance in order to put it in the LazyOptional.of(). -
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
It works fine if my SafeProtection class doesn't need a parameter when a new instance is created however because I do need a parameter it gives the above complaint -
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Right but when I do... My IDE complains that 'protection' needs to be a NonNullSupplier. -
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Im just not understanding what I need to pass to LazyOptional.of(); -
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
What do I cast 'protection' to? -
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Im following this (which I know is outdated) as my example: https://github.com/JamiesWhiteShirt/MinecraftForge/blob/2a933e2094f73e69749c478d921e75bb3d26ead4/src/test/java/net/minecraftforge/debug/ChunkCapabilityPollutionTest.java How do I return protection in #getCapability -
[1.16.3] Chuck Capability Not Registering
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Alright I am trying to fix the #getCapability but I am having issues with the following: @Override public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) { return (cap == ModFortKnox.PROTECTION_CAPABILITY) ? ((ModFortKnox.PROTECTION_CAPABILITY) protection) : null; } My issue is when I am trying to cast protection with PROTECTION_CAPABILITY its telling me that PROTECTION_CAPABILITY is an unknown class. For some reason I can't cast it. Any ideas? -
I just recently moved from 1.12.2 to 1.16.3 and ALOT has changed so I may just be messing something simple up. Capability parts: https://github.com/Beardlessbrady/FortKnox-Mod/tree/f81dc23108b2b3b1ed99fb6815702ba3e93841aa/src/main/java/com/beardlessbrady/fortknox/capabilities/protection Registering Capability: https://github.com/Beardlessbrady/FortKnox-Mod/blob/f81dc23108b2b3b1ed99fb6815702ba3e93841aa/src/main/java/com/beardlessbrady/fortknox/ModFortKnox.java#L42
-
[1.15.2] Dynamic Item texture creation
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Also I just want to make sure I'm doing this efficiently. I'm trying to dynamically create a texture in game. Is the best way to do it like your example where instead of filling a chess board with diamond blocks (I'll use a blank texture), the blocks will represent each individual pixel. If you get what I mean would adding these many quads cause any lag or am I doing this wrong/not efficiently? -
[1.15.2] Dynamic Item texture creation
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
One last thing... I am having trouble properly coloring the quads: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe15_item_dynamic_item_model/ChessboardFinalisedModel.java#L287-L290 On these specific lines you can set a parameter to a color, if I change any of them from white to anything else it just turns teal, any ideas? -
[1.15.2] Dynamic Item texture creation
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Ah, I got it working now thanks! (Was using a funky version of forge) -
[1.15.2] Dynamic Item texture creation
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
It seems that AtlasTexture and ModelLoader.instance().getSpriteMap... is no longer the same as your guide. Do you know how accessing those things have changed? -
[1.15.2] Dynamic Item texture creation
BeardlessBrady replied to BeardlessBrady's topic in Modder Support
Thanks a ton! -
Hello, Is it possible to create an image through code and texture an item with it in game?
-
I was successful in getting it to work on one of my blocks but can't get it to work on my other IBlockColor: https://github.com/Beardlessbrady/Currency-Mod/blob/def0b5dba3e7a723f742bae949c2007b8dd49f8e/src/main/java/beardlessbrady/modcurrency/block/ModBlockColors.java Block: https://github.com/Beardlessbrady/Currency-Mod/blob/def0b5dba3e7a723f742bae949c2007b8dd49f8e/src/main/java/beardlessbrady/modcurrency/block/tradein/BlockTradein.java
-
I have a custom container that uses the methods at the beginning. It all works fine in game it just doesn't save correctly to NBT on world restart
-
I know it's pretty bad but do you think it's the causing the issue with the NBT?
-
Yes it seems the tile entity method #writeToNBT is acting the same way