warjort
Members-
Posts
5420 -
Joined
-
Last visited
-
Days Won
175
Everything posted by warjort
-
One of these mods depends on braincell API, I need to uninstall it
warjort replied to Oso's topic in Support & Bug Reports
There's only 1 mod listed on curseforge that depends upon this mod: https://www.curseforge.com/minecraft/mc-mods/braincellapi/relations/dependents?filter-related-dependents=3 -
Issue with sophisticatedbackpacks or sophisticatedcore. Check you have the latest versions of these mods then contact the mod author.
-
You are missing the AutoRegLib mod https://www.curseforge.com/minecraft/mc-mods/autoreglib
-
Because it is the wrong place. Forge wants you to create/register objects when it is safe to do so. Otherwise you will cause hard to debug (random) errors. https://forge.gemwire.uk/wiki/Registration
-
How to make a block that will apply an effect to the player? [1.18.2]
warjort replied to Qwaz_5's topic in Modder Support
BeaconBlockEntity.applyEffects() -
Caused by: java.lang.IllegalStateException: Registry is already frozen at net.minecraftforge.registries.NamespacedHolderHelper.createIntrusiveHolder(NamespacedHolderHelper.java:192) ~[forge-1.19.2-43.1.1_mapped_parchment_2022.09.04-1.19.2-recomp.jar%23182%23189!/:?] at net.minecraftforge.registries.NamespacedDefaultedWrapper.createIntrusiveHolder(NamespacedDefaultedWrapper.java:210) ~[forge-1.19.2-43.1.1_mapped_parchment_2022.09.04-1.19.2-recomp.jar%23182%23189!/:?] at net.minecraft.world.item.Item.<init>(Item.java:57) ~[forge-1.19.2-43.1.1_mapped_parchment_2022.09.04-1.19.2-recomp.jar%23183!/:?] at net.writingwithfire.saintchapter.common.item.base.SCCustomItem.<init>(SCCustomItem.java:7) ~[%23188!/:?] at net.writingwithfire.saintchapter.common.item.ItemMindCrystal.<init>(ItemMindCrystal.java:8) ~[%23188!/:?] at net.writingwithfire.saintchapter.common.registry.RegistryItems.<clinit>(RegistryItems.java:42) ~[%23188!/:?] <-- HERE IS YOUR PROBLEM at net.writingwithfire.saintchapter.common.registry.RegisterEventHandler.attachEventHandlers(RegisterEventHandler.java:24) ~[%23188!/:?] at net.writingwithfire.saintchapter.common.CommonProxy.attachLifecycle(CommonProxy.java:36) ~[%23188!/:?] at net.writingwithfire.saintchapter.client.ClientProxy.attachLifecycle(ClientProxy.java:21) ~[%23188!/:?] at net.writingwithfire.saintchapter.SaintChapter.<init>(SaintChapter.java:30) ~[%23188!/:?] <-- HERE IT IS CREATING YOUR MOD Looks obvious to me. You are calling new Item() during the mod's classloading when the registries are frozen. In your original code, you don't do that, you generate the name from the class without creating the item.
-
I don't know why your code isn't working, but doing it that way seems like a bad idea to me? * You are modifiying the worldgen settings after it is saved to level.dat. Who knows what problems that will cause? It does at least mean DataFixerUpper will have no chance to fix your config when worlds are updated to new versions of minecraft. * You are completely ignoring the datapack mechanism. Which means if a user wants to totally redefine how villages spawn using a datapack, your code is still going to run and modify their data Here's a different way of doing it used by immersive engineering. It modifies the BuiltinRegistries during bootstrap which means it doesn't have the above 2 problems. https://github.com/BluSunrize/ImmersiveEngineering/blob/1.18.2/src/main/java/blusunrize/immersiveengineering/common/world/Villages.java It still looks pretty hacky to me. ๐
-
In that case it is the ItemEntity/ItemStack that needs to be fire proof not the Item. To do that you would need to put some additional data in the ItemStack NBT to say it is fireproof. Then when the ItemEntity is spawned into the world you replace it with your own custom ItemEntity that has something like: @Override public boolean isInvulnerableTo(DamageSource pSource) { return super.isInvulnerableTo(pSource) || pSource.isFire(); // Add check to ignore fire damage } You can see an example of replacing an ItemEntity spawn here: https://github.com/MinecraftForge/MinecraftForge/blob/73c1934e7ef931bafbafd0ceb6dce4cdd5dc02a2/src/main/java/net/minecraftforge/common/ForgeInternalHandler.java#L36 Instead of checking for hasCustomEntity() you see if the ItemStack has your "fireproof" NBT.
-
You can do that if you use an access transformer. https://forge.gemwire.uk/wiki/Access_Transformers But that will change all ItemStacks for that item, not just the ItemStack being held by the player.
-
[1.18.2] ItemRenderer#renderGuiItem save result to png file
warjort replied to xkorot's topic in Modder Support
Correction: I can see you wanting to use the ItemRenderer for items that have non-trivial models. You won't be able to use the raw pngs for them and some items like grass need colors applied to them. I am not familiar with the processing to turn buffers into images. But if I was going to do it, I would look at how Minecraft.grabPanoramixScreenShot() creates a NativeImage? Obviously, you will be rendering just the item not the full Level. ๐ -
[1.18.2] ItemRenderer#renderGuiItem save result to png file
warjort replied to xkorot's topic in Modder Support
That sounds like the completely wrong way to do this. You already have a .png file in the mod jar(s). A quick look at the MCEF source code shows it has a mechanism to have custom urls (schemes) that you can use to reference minecraft assets. There's even some code in their example mod https://github.com/Mysticpasta1/mcef-forge/blob/51e69d97e4241501ec33f96d066176eb4c723fd1/src/main/java/net/montoyo/mcef/example/ExampleMod.java#L41 If you have problems adapting that example to your use case, talk to the mod author. NOTE: The actual implementation of that example looks kind of horrible. It should at least be using Minecraft.getInstance().getResourceManager().getResource() instead of Class.getResourceAsStream(). -
Help With Registering Configured WorldCarver 1.18.2
warjort replied to UHQ_GAMES's topic in Modder Support
If you are using TerraBlender then you need to ask them. -
Help With Registering Configured WorldCarver 1.18.2
warjort replied to UHQ_GAMES's topic in Modder Support
You don't post the full context again, but I would guess this is configuring your custom Biome? Your biome is not present in the normal worldgen. If you want to modify other people's biomes (including vanilla) you need to use the BiomeLoadingEvent, it is called for every registered biome. In particular, event.getGeneration() gives you access each biome's BiomeGenerationSettingsBuilder -
[05Sep2022 15:45:19.825] [modloading-worker-0/ERROR] [net.minecraft.Util/]: Entity examplemod:digger_entity has no attributes You need to subscribe to EntityAttributeCreationEvent and register the attributes for your entity. e.g. untested pseudo code @Mod.EventBusSubscriber(modid = MODID, bus = Bus.MOD) public class ModEvents { @SubscribeEvent public static void registerEntityAttributes(EntityAttributeCreationEvent event) { event.put(EntityInit.EXAMPLE.get(), Mob.createMobAttributes().build()); } } Replace Mob.createMobAttributes() with your own code if these are not the attributes you want.
-
That is a question for ATI/AMD. It is their software that is crashing. Just the other day, somebody else found a different way to fix this problem: https://forums.minecraftforge.net/topic/115371-forge-1192-exit-code-1/#comment-514404
-
Help With Registering Configured WorldCarver 1.18.2
warjort replied to UHQ_GAMES's topic in Modder Support
You should donate to LexManos who pays for these forums. See his footer: https://forums.minecraftforge.net/topic/115670-forge-431-minecraft-1192/#comment-511620 -
Help With Registering Configured WorldCarver 1.18.2
warjort replied to UHQ_GAMES's topic in Modder Support
This is a compiler error. If the compiler tells you something is wrong, you need to be able to understand how to fix it. It's caused by public class ModCaveCarver extends CaveWorldCarver { CaveWorldCarver needs the vanilla configuration codec in its constructor. But you don't need to extend that class, you should have public class ModCaveCarver extends WorldCarver<ModCarverConfiguration> { -
Help With Registering Configured WorldCarver 1.18.2
warjort replied to UHQ_GAMES's topic in Modder Support
That is just a copied and renamed version of the vanilla class. It would be pretty hard to get that wrong. ๐ But you don't show where you use it or the error you are getting. -
Help With Registering Configured WorldCarver 1.18.2
warjort replied to UHQ_GAMES's topic in Modder Support
Don't paraphrase errors, show them with the full stacktrace. Also show the code you tried. We have no psychic powers.