Reposted by TelepathicGruntMrbysco @mrbysco.dev · 01/03/2026🍄 Uhhh... All I did was walk over mycelium... 🍄(Blame @telepathicgrunt.bsky.social ) #mcdev #cursed 061
TelepathicGrunt @telepathicgrunt.bsky.social · 31/05/2025#mcdev #modding NeoForge contest is live and underway! Free to join and have fun! 052
TelepathicGrunt @telepathicgrunt.bsky.social · 04/04/2025Serverside Summer Minecraft modding contest being hosted by NeoForge! Check it out! #mcdev 062
TelepathicGrunt @telepathicgrunt.bsky.social · 10/03/2025Another thing, if doing things in a BlockEntity like every 20 ticks, try and offset that interval per block. (Same for entities work, offset interval work for every entity). This way all the blocks or all the entities do not all do the work in the exact same tick and cause a lag spike. Spread it out 000
TelepathicGrunt @telepathicgrunt.bsky.social · 10/03/2025Though it probably depends more on the exact use case to determine the best solution there. If uncertain, it is always a good idea to profile the game with a worst case setup and see where the bottleneck is with your implementation. 000
TelepathicGrunt @telepathicgrunt.bsky.social · 10/03/2025That isn't too bad to do iirc. The ticking block would do the check every 20 ticks or so and call the level's method to get entities within a range. This loops through existing entities in the chunks it intersects to see if in range. Do this as few times as needed and try to cache results when able. 200
TelepathicGrunt @telepathicgrunt.bsky.social · 09/03/2025Direct neighbors like 6 blocks, check the blockstates themselves. This will be fast enough since at 6 blocks, you won't see much difference. POI is better when scanning a radius of 10+ blocks or so. Scans that can be crippling to do. (just 10 square radius is 8000 blockpos to check already!) 000
TelepathicGrunt @telepathicgrunt.bsky.social · 08/03/2025This is the same system Villagers use to find nearby beds and workstations very quickly without bringing the game to a crawl. The POI system is designed for this so you do not need to iterate over every position looking for your block, which is slow to do as getChunk and getBlockState has overhead. 010
TelepathicGrunt @telepathicgrunt.bsky.social · 08/03/2025If your #minecraft mod need to check if a position is near your block (like during entity ticking), do not do a scan. Instead, register your block into the Point Of Interest system and use that to grab your nearby blocks much faster! Greatly reduces lag compared to blockpos scanning. #mcdev #modding 5205
TelepathicGrunt @telepathicgrunt.bsky.social · 21/02/2025This also goes for goal classes as well for any goal-based mob or animal. Goals are loaded right away when entity spawns so they too need to use the entity's RandomSource to be worldgen safe. Vanilla bee's own goals have this bug which is why I mixin them to make them worldgen spawning safe. 120
TelepathicGrunt @telepathicgrunt.bsky.social · 21/02/2025When creating a new entity in a #minecraft mod, always try to use the entity's own RandomSource in the entity's class. You have to use this random and not the incoming level's random or else your entity can crash the game when the entity spawns during worldgen (Very hard to diagnose) #mcdev #modding 1204
TelepathicGrunt @telepathicgrunt.bsky.social · 09/01/2025To be clear, for many of the logspams we see, the slowness is on world load, server join, starting game, and any resource reloading . The more logging that happens, the more time the computer has to spend writing to an increasingly larger log file. The times start to add up. 020
TelepathicGrunt @telepathicgrunt.bsky.social · 09/01/2025We have seen too many mods that just fill the logs with mod compat recipe errors because they forgot to add this condition check. Ideally, everyone would know about this condition and keep the logs clean so only actual errors show up. Makes it easier for pack makers and players to find real problems 100
TelepathicGrunt @telepathicgrunt.bsky.social · 09/01/2025Also, logspamming is bad for performance. Really. Especially on Windows iirc. Just please try to keep the amount of logspam down for your mods. I beg of you 100
TelepathicGrunt @telepathicgrunt.bsky.social · 09/01/2025For #minecraft mods that have recipes that should only load when another mod is present, please use this condition in the recipe to prevent logspam: "neoforge:conditions": [ { "type": "neoforge:mod_loaded", "modid": "examplemod" } ] docs.neoforged.net/docs/resourc... #mcdev #moddingdocs.neoforged.netData Load Conditions | NeoForged docsSometimes, it is desirable to disable or enable certain features if another mod is present, or if any mod adds another type of ore, etc. For these use cases, NeoForge adds data load conditions. These ... 2223
TelepathicGrunt @telepathicgrunt.bsky.social · 30/12/2024Doing this optimization for Bumblezone caused my Gazebuzz Cluster's layout generation is go from about 3 seconds to around 1.5 seconds. And that structure has a huge number of pieces to spawn and like 28 Jigsaw Blocks to check in every piece. Lots of Jigsaw match-up checks. 010
TelepathicGrunt @telepathicgrunt.bsky.social · 30/12/2024Just added a new optimization to my StructureLayoutOptimizer mod (1.16 to 1.21). For structures with many pieces that have many Jigsaw Blocks, this new code should reduce the layout generation time a ton legacy.curseforge.com/minecraft/mc... modrinth.com/mod/structur... #minecraft #modding #mcdevlegacy.curseforge.comStructure Layout OptimizerAttempts to optimize the generation of Jigsaw Structures and NBT pieces 190
TelepathicGrunt @telepathicgrunt.bsky.social · 27/12/2024After optimizing the features in my Bumblezone mod some more, worldgen is even faster now! The caves are pretty much the main thing taking up worldgen time now but I doubt I can make them faster without losing the cave shape I like. #minecraft #mcdev #modding 190
TelepathicGrunt @telepathicgrunt.bsky.social · 23/12/2024Special thanks to Malte and ThatGravyBoat for working hard to make a NeoForge/Forge mitigation mod that will strip certain mod's sensitive config fields from ServerConfigs's sync to the client. www.curseforge.com/minecraft/mc... modrinth.com/mod/serverco... #mcmods #minecraft #moddingcurseforge.comServerConfigCleanerAvoids syncing sensitive values in configs to the client 29 Downloads | Mods 081
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024This was one of the common complaints iirc back when the config overhaul was done back in like forge 1.14. The neo team is a bit divided on the two ideas we could do to make sure devs knows exactly what is synced and isn’t. 000
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Still trying to figure out this bluesky stuff lol 000
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Until then, please read the Javadoc for the config types when deciding which one to use. Thank you. Edit: This does also impact Forge all the way back to around 1.14 when the config system was redone to have synced SERVER configs. So be sure to double check your older mods as well. 000
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024or roll out your own storage/config of the data. There is talk of possibly renaming the SERVER config to be more clear that it is synced unlike the other configs or rework it so syncing is a separate option from the config type. 100
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024There has been several mods found to have been accidentally exposing their private configurations to clients due to the syncing of SERVER configs. If you have been storing something private in SERVER configs, I urge you to swap to COMMON configs that are unsynced 100
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Message from the picture: Hello, for those of you who use SERVER configs, please note that these configs are synced from the server to clients when they client connects. This means that these configs are not suitable for storing private info such as passwords, API Keys, webhooks, tokens, or secrets 100
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Character limits goes brrr. I’ll divide it up as replies then 100
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Echoing my message on Discord to here, be sure you are not storing passwords, secrets, webhooks, etc in SERVER type configs on Forge/Neoforge. The config is synced to clients so try and use unsynced configs or roll out your own for private info you’re storing in your mods. #minecraft #modding #mcdev 4174
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Optimized the surface rules a bit more. Should be slightly faster now than previous video 250
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Had recording quality low by default thanks to Discord's file limit as I sometimes post videos to there. Yeah I don't buy Discord's nitro as it is otherwise pointless lol. 020
TelepathicGrunt @telepathicgrunt.bsky.social · 18/12/2024Working on trying to make my Bumblezone mod's worldgen a bit faster for 1.20.1 and 1.21.1 #minecraft. Feels quite a bit faster than unmodded overworld. The main two things taking up most of worldgen in my mod are Surface Rules and the caves using noise generators. #mcdev #modding 3160
TelepathicGrunt @telepathicgrunt.bsky.social · 17/12/2024To be more specific when using CUSTOM_DATA, call copyTag(), and modify THAT new CompoundTag. After, make a new CustomData object and give it the new modified CompoundTag. Save that CustomData to the item's CUSTOM_DATA. If you do not do this, you can cause concurrency issues or data entangled items. 010
TelepathicGrunt @telepathicgrunt.bsky.social · 17/12/2024Though it is best not to use CUSTOM_DATA and just make your own DataComponent class that has your data as regular fields and a codec to do the serializing/deserializing. It is much faster to read data from these dedicated components than to manipulate NBT. Better performance for items overall. 010
TelepathicGrunt @telepathicgrunt.bsky.social · 17/12/2024Ever since 1.20.5 #Minecraft, NBT on items have been replaced with DataComponents. As a mod dev, you should have dedicated fields for your data in these components. The CUSTOM_DATA DataComponent holds legacy nbt and if you do use it, ALWAYS call copyTag() or else bugs will happen. #mcdev #modding 271
TelepathicGrunt @telepathicgrunt.bsky.social · 14/12/2024When spawning entities during worldgen, use `EntityType.<entity>.create(` and then `worldGenRegion.addFreshEntityWithPassengers(`. If you call `EntityType.<entity>.spawn(`, you will deadlock/lock-up the game as that will call non-worldgen safe methods on the serverLevel. #minecraft #mcdev #modding 081
TelepathicGrunt @telepathicgrunt.bsky.social · 11/12/2024For mods that aren't exactly traditional mods such as Optifine, you will have to resort to a class presence check instead like this: if (ClassInfo.forName("net.optifine.Config") != null) { For mixin targeting, if you decide not to use MixinPlugins, the `pseudo` annotation may work. 020
TelepathicGrunt @telepathicgrunt.bsky.social · 11/12/2024The reason you cannot do ModList check in a MixinPlugin is because it may not be fully loaded if you are targeting early loading classes. LoadingModList is recommended instead for MixinPlugins as that will always be ready and present for you to use in early loading code. 110
TelepathicGrunt @telepathicgrunt.bsky.social · 11/12/2024If you need to check if a Minecraft mod is present in Neoforge before you run some code, do: if (ModList.get().isLoaded("modid")) { If you need to check if mod is on within a MixinPlugin, do this instead: if (LoadingModList.get().getMods().get("modid") != null) { #minecraft #modding #mcdev 1181
Reposted by TelepathicGruntThe NeoForged Project @neoforged.net · 08/12/2024We have held elections for the Steering Council (SC). Welcome new SC members @gigaherz.bsky.social, @marchermans.bsky.social and @telepathicgrunt.bsky.social! Read more at neoforged.net/news/sc-elec.... #mcdev #minecraftmodding #neoforgeneoforged.netSteering Council Elections 2024Steering Council Elections 2024 2226
TelepathicGrunt @telepathicgrunt.bsky.social · 07/12/2024Is that optimization within the VoxelShape's optimize method? Would've assume trying to minimize the number of points saved into VoxelShape will help when checking collisions against it later (less points to compare against) 110
TelepathicGrunt @telepathicgrunt.bsky.social · 07/12/2024When you define your getShape method in a custom block, please do not construct the VoxelShape directly in there. getShape is called excessively and VoxelShape creation is not cheap. Create the VoxelShape in a static field and call that pre-made VoxelShape in getShape. #minecraft #modding #mcdev 181
TelepathicGrunt @telepathicgrunt.bsky.social · 06/12/2024In this case, this is more applicable to noise generators such as Perlin or Simplex. Noise generators that create a smooth gradual changing noise values based on input positions. 000
TelepathicGrunt @telepathicgrunt.bsky.social · 06/12/2024Basically the idea is sample more frequently when you get close to the threshold you want and sample less frequently when farther away from the threshold because it'll take some extra positions before the noise generator will start returning values close to the threshold again. 100
TelepathicGrunt @telepathicgrunt.bsky.social · 06/12/2024I make use of this in Bumblezone with my feature that carves out caves. The noise value increases/decreases very slowly so I can skip checking positions when value is really far from the carving threshold. I do skip even more spots at once if value is even farther from threshold. Makes my mod fast. 000
TelepathicGrunt @telepathicgrunt.bsky.social · 06/12/2024When using a slow-moving noise generator to sample a huge number of positions during #minecraft #modding worldgen, you can skip over a few spot if the noise value is too far from your target threshold. Gives a significant speed boost when values are at extremes. (X in pic are skipped checks) #mcdev 2111
TelepathicGrunt @telepathicgrunt.bsky.social · 04/12/2024The general solution then is to use DataAttachments or Components from the modloaders to attach data to the entity that isn't your own entity. Then use packets to sync the data. (Do a packet from client to server when entity loads on client to ask for data. Server sends data back as 2nd packet) 2/2 040
TelepathicGrunt @telepathicgrunt.bsky.social · 04/12/2024When making your own mob while #minecraft #modding, using EntityDataAccessor to have synced data is fine. But do not mixin add those to other people's/vanilla's mobs. They are order dependent so if the mixin applies in different order on client vs server, it'll cause disconnect people. #mcdev 1/2 170
Reposted by TelepathicGruntjacobsjo @jacobsjo.eu · 03/12/2024A change I would like to highlight from #Minecraft 1.21.4 is a bug-fix: MC-272062 - "Dimension padding doesn't affect the start piece." This fix makes it possible for data packs to add structures to the end without them ending up in in the void at y=0. #mcdev 2132
TelepathicGrunt @telepathicgrunt.bsky.social · 02/12/2024Just to be clear, only copy and modify it if you need to check if in a structure during worldgen such as knowing when to not spawn a feature. Otherwise, if running on the main thread, using StructureManager itself is ok and will work fine. 000
TelepathicGrunt @telepathicgrunt.bsky.social · 02/12/2024To check if you are in bounds of a structure when #minecraft #modding. Use StructureManager from the ServerLevel like this: StructureManager sm = serverLevel.structureManager(); However, it's not worldgen safe so copy and modify it to use a WorldGenRegion instead: github.com/TelepathicGr... #mcdevgithub.com 151