The Meaning of Life, the Universe, and Everything.
Join Date:
12/4/2013
Posts:
61
Minecraft:
grumpythefirst
Xbox:
GrumpyCruton
Member Details
Hi guys. I'm currently developing a mod called Fire Traces, and its almost done!
The only problem I'm having is, I want my ash blocks that I created to catch nearby blocks on fire. I've tried looking in the BlockFire class, which is how I figured out how to make particles come off the block, but I'm having trouble getting the block to spread fire to nearby objects.
finally figured this out
On a side note, is there any way that I can make a block spawn where a block was just destroyed by fire? I found a setBlockToAir method which I figured would be easy to override to drop a different block instead, but I wasn't sure. Any help would be much appreciated.
I can't seem to get this to work. I made a new class which extends BlockFire, and used @Override on the onNeighborBlockChange method and made it System.out.println to tell me when the block is placed as air, but it doesn't ever return anything.
The Meaning of Life, the Universe, and Everything.
Join Date:
12/4/2013
Posts:
61
Minecraft:
grumpythefirst
Xbox:
GrumpyCruton
Member Details
That's how I can do it. Make a custom BlockFire, and use the onTickEvent to check every time a regular BlockFire is placed, and replace it with mine? Or maybe I can just use it to replace the fire itself with my block like 10% of the time?
Ugh, how can I check if a fireblock was placed? >.<
starting a new thread for this because its a completely different question.
Im also making mod that will replace block by another block when it burn but i also end with this problem.
I mean find event or method that will be called always when some block burn. But i find out that there is no such a thing an I was forced to make my own custom fire block extends BlockFire but it is simply impossible to force game to replace normal in-game fire by my fire without iterating all Blocks in world or in some radius what will totally kill your CPU, and RAM. There is some methods in game that possibly can do a job but all is private, only thing that is not private is substitutionAlias what you also use as you said in you other thread, but this method is totally broken somehow simply GJ Mojang!
It looks like this is impossible. I thought it too, but then i find mod called glens gasses and in this mod in-game fire will spawn smoke when burn some block away with means it must be possible somehow.
OK so now only problem is find that code in glens gasses source code what is big problem because that mod is simply huge but i let u know when i find it.
OK so I found it BUT i understand one huge nothing.
But I found a solution of whole problem!
At the end i also return back to substitutionAlias. I really don't know why getFlammability and get getEncouragement returning 0 but I have a simple solution.
Just ctrl + c and ctrl + v this method below in to your custom fire class and call it from class constructor or from whatever u want, just call it And at finally we have arrived problem should be SOLVED!
Hi guys. I'm currently developing a mod called Fire Traces, and its almost done!
The only problem I'm having is, I want my ash blocks that I created to catch nearby blocks on fire. I've tried looking in the BlockFire class, which is how I figured out how to make particles come off the block, but I'm having trouble getting the block to spread fire to nearby objects.finally figured this out
On a side note, is there any way that I can make a block spawn where a block was just destroyed by fire? I found a setBlockToAir method which I figured would be easy to override to drop a different block instead, but I wasn't sure. Any help would be much appreciated.
world.setBlock(), the setBlockToAir method uses it.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
Yes, but how can I fire this method when a block is burned? I can't find any method that tells when a block is burned.
use onNeighborBlockChange()
I can't seem to get this to work. I made a new class which extends BlockFire, and used @Override on the onNeighborBlockChange method and made it System.out.println to tell me when the block is placed as air, but it doesn't ever return anything.
I'm currently working on a way to detect when blocks are burnt, but it's going to take me a while.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
How long do you think it will be? & How are you going to release your findings?
Few days at least. I'll put it up on my github
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
Oh, i thought it was a custom fire block. Maybe a good way would be using forge's event listeners, TickEvent handlers to be exact.
Could you go more into detail with this? How can I check if a block is burned? I don't have a whole lot of experience with event handlers.
nevermind, i don't think it's possible without scanning every block in existence
Is there no possible way to replace the method that removes the block currently? Or do I have to make a new BlockFire?
That's how I can do it. Make a custom BlockFire, and use the onTickEvent to check every time a regular BlockFire is placed, and replace it with mine? Or maybe I can just use it to replace the fire itself with my block like 10% of the time?
Ugh, how can I check if a fireblock was placed? >.<
starting a new thread for this because its a completely different question.
Ugh, this isn't possible with my knowledge(Which isn't that much), sorry.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
Hello there!
Im also making mod that will replace block by another block when it burn but i also end with this problem.
I mean find event or method that will be called always when some block burn. But i find out that there is no such a thing an I was forced to make my own custom fire block extends BlockFire but it is simply impossible to force game to replace normal in-game fire by my fire without iterating all Blocks in world or in some radius what will totally kill your CPU, and RAM. There is some methods in game that possibly can do a job but all is private, only thing that is not private is substitutionAlias what you also use as you said in you other thread, but this method is totally broken somehow simply GJ Mojang!
It looks like this is impossible. I thought it too, but then i find mod called glens gasses and in this mod in-game fire will spawn smoke when burn some block away with means it must be possible somehow.
OK so now only problem is find that code in glens gasses source code what is big problem because that mod is simply huge but i let u know when i find it.
OK so I found it BUT i understand one huge nothing.
But I found a solution of whole problem!
At the end i also return back to substitutionAlias. I really don't know why getFlammability and get getEncouragement returning 0 but I have a simple solution.
Just ctrl + c and ctrl + v this method below in to your custom fire class and call it from class constructor or from whatever u want, just call it And at finally we have arrived problem should be SOLVED!
But maybe more shorter and elegant way will be this:
I recommend to call this from init method.