Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. No, No, No https://mcforge.readthedocs.io/en/latest/events/intro/
  2. setDefaultState is called in mojang mappings registerDefaultState you can use the bot an the forge discord server https://discord.com/invite/UvedJ9m EDIT: commands: mcpe -> mojang : !moj -c mcp methode/field/(1.17) class mojang -> mcpe : !mcp -c moj methode/field/(1.17) class this create StateDefinition but set not the default values
  3. i fixed the error in the generation, i forgot to put the structure in the default structures (DimensionStructuresSettings#DEFAULTS) look here for details
  4. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  5. there is a simple solution to this: public static String getBlockName(Block blockIn) { List<Block> registryBlocks = Registry.BLOCK.stream().collect(Collectors.toList()); for (Block block : registryBlocks) { if (block == blockIn) { return block.getRegistryName().getPath().toUpperCase(); } } return Blocks.AIR.getRegistryName().getPath().toUpperCase(); } Input: Blocks.ANDESITE_SLAB Output: ANDESITE_SLAB
  6. i currently try to find out how the world gen works, at the moment im working on a structure but i have some problems with the generation. i use this as an example, i created everything for the generation, but the structure is not generating this is my structure this is the structure registry this is my world load event and this my biome loading event thanks for replies
  7. you can get a block form a ResourceLocation, take a look at NBTUtil#readBlockState, do somthing like that
  8. use PlayerEntity#displayClientMessage and set the second parameter to true, note: only the ClientPlayerEntity has an working implemention of this methode
  9. post the full class (also your imports) and not as a screenshot, use the code feature
  10. damn i mean final, thanks this fixed the problem and is this important, or is this just debbing: Null comment for config option Nero Common Config, this is invalid and may be disallowed in the future.
  11. I understood how the method works my problem is that I don't have an instance of ConfigValue, I can't create a temporary new one and if I need the instance from the class in which the ConfigValue is located that I want to add to the config, the automatic addition is "for the bucket". the other possibility would be to set the fields with the ConfigValues to static, but i dont want to do that.
  12. Minecraft#getInstance -> is client side and the BlockEvent$BreakEvent is only executed on the server GameType = GameMode the player's game mode is saved in the PlayerInteractionManager. if you need your gamemode of the player do something like this: Note: this is only on server side, so you need to check if the Player you get, an instance of ServerPlayerEntity is player.gameMode.getGameModeForPlayer();
  13. so i need the class of the ConfigValue there? and ConfigValue.class doesn't work
  14. you have to overwrite the DimensionType file (minecraft / data / dimension_type / the_nether.json) create a file with the exact name in this directory, take a look at these two links my dimension type for a new dimension and the minecraft wiki for dimensions (look at the vanilla defaults) https://github.com/Luis-st/Forge-1.16.5-Nero/blob/main/src/main/resources/data/nero/dimension_type/deepslate.json https://minecraft.fandom.com/wiki/Custom_dimension
  15. yes the game starts, the config is also created, but the try-catch block still catches an exception for each ConfigValue, I also get a NullPointerException when I use the values that I set via reflection in the code (xp drop of my custom ores)
  16. that doesn't fix the problem i still get the same error; i now use the ClassLoader of my main class! this is the update code
  17. use a git client to handle these
  18. you need: a github account a git client (e.g. GitHub Desktop) create: create a new repository (file -> new repository) search the folder and add all the files of your mod replace all files that have been created automatically with those of forge if available (never the .git folder) use the push button to publish your repo, don't use the button "keep this code private" points 2 and 3 can change if you do this directly from your IDE (I have no idea how you do it from your IDE) post the link of your reop
  19. okay makes sense, but can i get the ClassLoader of my main mod class? can i do something like that: Nero.class.getClassLoader()
  20. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  21. huh? AutomaticEventSubscriber uses the ClassLoader to register the event to the EventBus, but I don't have to register anything
  22. okay AutomaticEventSubscriber uses the ClassLoader of the mod main class, but I didn't use a ClassLoader in my code, so where do I have to set/use the ClassLoader?
  23. I have now created a custom config system which also works, but I get an error that is actually not possible: log part: [11:43:37] [modloading-worker-1/WARN] [ne.lu.ne.Nero/]: Can't define Config Value coalXpMin java.lang.IllegalArgumentException: Can not set net.minecraftforge.common.ForgeConfigSpec$ConfigValue field net.luis.nero.api.block.ModOreBlock.coalXpMin to net.minecraftforge.common.ForgeConfigSpec$ConfigValue complete log: log.log this is the config class this is the config value class
×
×
  • Create New...

Important Information

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