Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Luis_ST

Members
  • Joined

  • Last visited

Everything posted by Luis_ST

  1. 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
  2. i fixed the error in the generation, i forgot to put the structure in the default structures (DimensionStructuresSettings#DEFAULTS) look here for details
  3. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  4. 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
  5. 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
  6. you can get a block form a ResourceLocation, take a look at NBTUtil#readBlockState, do somthing like that
  7. use PlayerEntity#displayClientMessage and set the second parameter to true, note: only the ClientPlayerEntity has an working implemention of this methode
  8. post the full class (also your imports) and not as a screenshot, use the code feature
  9. 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.
  10. 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.
  11. 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();
  12. so i need the class of the ConfigValue there? and ConfigValue.class doesn't work
  13. 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
  14. 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)
  15. 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
  16. use a git client to handle these
  17. 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
  18. okay makes sense, but can i get the ClassLoader of my main mod class? can i do something like that: Nero.class.getClassLoader()
  19. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  20. huh? AutomaticEventSubscriber uses the ClassLoader to register the event to the EventBus, but I don't have to register anything
  21. 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?
  22. 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
  23. DeferredRegisty ForgeRegistries#POTIONS for an effect, ForgeRegistries#POTION_TYPES -> for a potion

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.