Everything posted by warjort
-
Mc crash when loading
The one I underlined. Looking at your previous log the mod file name is:
-
getting exit code 1 every time I try to launch forge 1.19.3-forge-44.1.0
There's no error in that log. If it really is the complete log, post the launcher_log.txt from directly after the crash. See my footer for how to find it. And please post logs to a file sharing site instead of directly in the forums.
-
Mc crash when loading
Check you have the latest version then contact the mod author.
-
[1.19.3] [solved] custom TrunkPlacerType
Why are you trying to call the TrunkPlacerType.register() method? All that method does is register the codec with the registry, i.e. exactly what your RegistryObject is doing. Since you don't show any other details, it's impossible to answer your question. Posting small snippets of code out-of-context isn't going to get you many answers (I would have ignored this post for that reason if it wasn't your first forum post). Put your code on github where we can see everything in context and maybe try it for ourselves if it is not obvious what the problem is. On a quick search of github: https://github.com/search?q=TrunkPlacerType&type=code I can see the aether mod creating a trunk placer for a recent version of minecraft. Maybe you can compare your code with theirs if you don't want to share your code for some reason?
-
Mc crash when loading
It's private.
-
Mc crash when loading
That's not the launcher_log.txt. See my footer. And please post files on a file sharing site not in the forums. It's impossible to use search in the forums when you get more than one log on a thread.
-
Crashing while loading mod
One of your config files is invalid. You can find it in the config subfolder. Contact the mod author to ask how to fix it. Or usually you can delete the file and it will be recreated with default values.
-
Mc crash when loading
There is no error in that log. Post the launcher_log.txt from directly after the crash.
-
Spawn lightning
A LightningBolt is just an entity, you spawn them like any other. Using your IDE to search for uses of EntityTypes.LIGHTNING_BOLT would give you the LightningRodBlock which has the code you want. In case you haven't guessed already. You are beginning to annoy me with all these lazy beginner questions. Put some effort into finding the answer for yourself before posting here. And that means more than finding one tutorial that doesn't work because it is for the wrong version of minecraft.
-
removing Item from inventory
In future, please put your code on github where we can see everything in context. Random snippets of code are normally useless unless the error is obvious. Most questions like the one you posted above, will normally just get ignored as unanswerable. However, I can tell you in this case, that Inventory.removeItem() does an == (instance equality) check on the ItemStack. There is no possible way an ItemStack newly created will be the same object instance as one in the player's inventory.
-
cannot invoke packet because it is null
If its not caused by that memory issue and you still have the same error, then you have a mod with broken networking. Since the error says the network packet is "null", it's not going to tell us which mod is causing the problem. Probably, the only way you will find the problem mod is to experiment with removing mods until the problem goes away. Backup your world(s) before removing mods.
-
removing potion effect after death
You are using TickEvent wrong. https://github.com/MinecraftForge/MinecraftForge/blob/1.19.x/src/main/java/net/minecraftforge/event/TickEvent.java#L21 NOTE: how it has different subclasses for what is ticking. You are responding to every event on both the client and server (the side). Also it has a "Phase" to say whether it is start or end of the tick. If you don't check that your code will run twice per tick. Finally, using static fields to store shared data (your timer field) is also wrong. You need to store the value against whatever you intend to tick, I would guess the player? e.g. using a capability. https://forge.gemwire.uk/wiki/Capabilities, but in your use case you can probably just check the player's mob effects? That way when the player dies it will stop ticking and you can also handle more than one player ticking with your effect.
-
Particle Beam???
By the way, this is rubbish Only the player using the item will see the particles. Use the sendParticles() which will broadcast the particles to all players in range. See for example PotionItem.
-
Particle Beam???
That is what the method I proposed does on the client side. But you will find it easier and less error prone to use Mojang's intended way of writing simple handlers: if (!checkConditionsAreRelevant()) { return "PASS"; } if (!level.isClientSide) { // server code that actually does stuff } // Code common to server and client here, e.g. playing sounds return InteractionResult.sidedSuccess(itemStack, level.isClientSide); If you don't want to follow similar code patterns used in vanilla code that is your choice. But don't expect to get much help in this forum, beyond "you are doing it wrong" or just being ignored.
-
cannot invoke packet because it is null
Or user_jvm_args.txt, since this error looks like it is on the server.
-
cannot invoke packet because it is null
Looks like you need to give the game more memory. This will be in the configuration of whatever launcher you are using. Also, please don't post logs in the forum, use a file sharing site.
-
Particle Beam???
"PASS" means you are not interested in this interaction and so it won't send a network packet to the server, making the other code pointless. Use InteractionResult.sidedSuccess(), e.g. see EggItem.use() for a simple example.
-
Forge server error
https://forums.minecraftforge.net/topic/122698-forge-1182-server-wont-load-up-with-dawncraft/#comment-533997
-
Forge server error
Use java 17, mixin does not support java 20
-
How to add custom properties to a vanilla block 1.19.2
For vanilla models, you can use a BlockColor handler to change a texture's color based on data from the BlockAndTintGetter interface of the Level. That's how vanilla changes grass, leaves and foliage colors based on the biome. https://forge.gemwire.uk/wiki/Tinted_Textures For anything more complicated, e.g. changing textures, you would need to make your block into a BlockEntity so you can write your own BlockEntityRenderer. You certainly can't use the ServerLevel during rendering, you need to use the ClientLevel. For your other question(s), we don't design or write your mod for you. You need to figure that out for yourself.
-
How to add dependency's
You already have the above dependency on forge's internal mod. Just make a new entry for whatever mod you depend on. NOTE: If you are writing an extension to another mod, you usually want ordering="AFTER", e.g. if you want to change the other mod's recipes. https://forge.gemwire.uk/wiki/Mods.toml_file I shouldn't have to keep posting links to the wiki. This forum does not exist so you can use people as a search engine. Please at least familiarise with what topics it discusses, even if you don't read the details immediately.
-
How to add custom properties to a vanilla block 1.19.2
ServerLevel.setBlockAndUpdate() Why would there be an event? Only you know when the block becomes irradiated.
-
How to add custom properties to a vanilla block 1.19.2
As the error says, you can't change the block states for vanilla blocks. Changing/re-registering vanilla registery objects is a bad way to do things anyway. * You will cause all sorts of conflicts with other mods * You will run into places where Mojang hard code things. A quick search of the 1.19.4 code finds 59 references to Blocks.GRASS_BLOCK alone (i.e. not your block) You should rethink what you are trying achieve. e.g. instead of trying to set a new "irradiated=true" property on the vanilla block, make your own "IrradiatedGrassBlock" and swap the block when it becomes irradiated. Or another way would be to keep track of the radiation levels in a Chunk Capability: https://forge.gemwire.uk/wiki/Capabilities Also; * Don't post logs in the forum where they are difficult to search (especially when there is more than one on a thread), use a file upload site. * Typically if you want help with your code, you need to post more than just a small snippet of it out-of-context, put your code on github where we can see everything that might be relevant.
-
How to add dependency's
https://forge.gemwire.uk/wiki/Dependencies
-
After I killed a mob in nether fortress the game keep crashing every time I got in. (Dawncraft)
These are the Forge support forums. We can't fix mods, we can only identify which one is causing the problem. You either need to contact the dawncraft modpack authors or the mod author directly: https://www.curseforge.com/minecraft/mc-mods/epicfight-dual-greatsword
IPS spam blocked by CleanTalk.