Jump to content

Recommended Posts

Posted

I've made some custom fire blocks, borrowing all the code from BaseFireBlock and FireBlock. They don't produce any particles when I punch them to extinguish them, but they do make particles and the 'poof' wool sound when they break as a consequence of a block update - usually, because they've burned the block they're on top of.

They didn't do this when they extended BaseFireBlock, but for some reason they do now that they're extending my custom replacement, even though the code is the same.

How can I prevent this behavior?

Posted

I am not sure what you are describing? There are particle effects produced while the fire is burning. I don't see any when the block is destroyed?

There is a Level.levelEvent() for event 1009 in BaseFireBlock.playerWillDestroy() which ends up in LevelRenderer.levelEvent() that plays the fire extinguish sound(s).

 

A word of warning. You should be careful with this kind of thing. Not everything is OOP. e.g. search the codebase for references to (Base)FireBlock or Material.FIRE and you will find old legacy hardcoding. There is also the more modern BlockTags.FIRE, which I guess you want to add your block to.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted
On 7/9/2022 at 6:14 PM, warjort said:

I am not sure what you are describing? There are particle effects produced while the fire is burning. I don't see any when the block is destroyed?

There is a Level.levelEvent() for event 1009 in BaseFireBlock.playerWillDestroy() which ends up in LevelRenderer.levelEvent() that plays the fire extinguish sound(s).

 

A word of warning. You should be careful with this kind of thing. Not everything is OOP. e.g. search the codebase for references to (Base)FireBlock or Material.FIRE and you will find old legacy hardcoding. There is also the more modern BlockTags.FIRE, which I guess you want to add your block to.

I've already put the blocks in BlockTags.FIRE, which didn't help.

The problem is not playerWillDestroy(); I copied that and it works fine. When the player punches fire, it disappears and plays the fire extinguishing noise without making particles. The problem is also not the animation: my fire produces smoke perfectly fine as well.

The problem is that when my custom fire 'breaks' because it destroys the block it's adjacent to, it makes a breaking sound (wool, as it happens) and bursts into a scatter of fire-textured particles, just like any other destroyed block. Vanilla fire doesn't do this. I'd like my fire to also not do this. What should I override?

Posted (edited)

Ah, thank you so much.

I suppose the only parts of BaseFireBlock I can't override are methods I can simply choose not to call anyway, so this is doable even if it isn't ideal.

Edit: I can confirm that this works.

Edited by Syric

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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