Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

DrunkBlood's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. How do I disable features via my Mod Config the proper way? I tried only registering them when my Config says but that had problems with ModConfigEvent firing late and other default values not being set.
  2. Hi, my mod uses an ore distribution to determine with which block it should replace. Currently I use as a default this table where each entry in the matrix is probability adding to 100% for each y-lvl except where my mod does not replace the block::stone y - level | coal | iron | gold | lapis | redstone | diamond >110 0 0 0 0 0 0 >60 1 0 0 0 0 0 >30 50 50 0 0 0 0 >15 25 50 15 10 0 0 >5 20 40 15 7 13 5 >0 0 0 0 0 0 0 For my config I want to be able to edit this matrix where the y-level border is, the blocks and the probability linked to them. Using nightconfig and ForgeConfigSpec (.define(String path/name, T defaultValue, Predicate<Object> validator)) I would implement my Data Structure T as an HashMap<Integer,List<HashMap<String,Float>>> with HashMap<y-level,List<HashMap<ResourceLocationofBlock,probability>>> (ResourceLocationofBlock as "namespace:block" like "minecraft:coal_ore") ,a custom Supplier giving the table above and a custom Predicate checking the ResourceLocationofBlock, the probabilty and wether all y-values are coverd. My Questions: Can I use a HashMap? in other words do I need to use a HashTable for thread safety Can I use ResourceLocation.isResouceNameValid(String) when my Config loads? (Using CLIENT_BUILDER since @OnlyIn(Dist.CLIENT)) Is there another way to allow an user to add custom blocks to my config? (My way would be an Array/List which is typed in the Config) Is this ForgeConfigSpec the way to do Config in Forge 1.15? Edit: changed y-level to Integer instead of String
  3. Nice tutorial - worked for me I only have 1 Question: where you define your Item and instantiate it as null; Do you use the @ObjectHolder annotation to allow Minecraft Forge to fill the item or what?
  4. Trying to create my hay_eatable block with a PropertyDirection and a PropertyInteger from 0 to 9 I can't seem to create the right json file. Stacktrace, json and Block class are attached. stacktrace.txt hay_eatable.json BlockHayEatable.java
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.