To allow balls to have x2 hit when they're on fire, the code is a little hacky and could be improved. Right now in ItemGenerator.hit(), I check if the ballsOnFire flag is set to true and if it is and the item is a block item, I just call item.hitItem() a second time. This is dumb and I think the correct way to do it is to update the Protocol and each Item type to include an optional parameter in their respective .hit() functions to handle and respond to things in their environment.
To allow balls to have x2 hit when they're on fire, the code is a little hacky and could be improved. Right now in
ItemGenerator.hit()
, I check if theballsOnFire
flag is set to true and if it is and the item is a block item, I just callitem.hitItem()
a second time. This is dumb and I think the correct way to do it is to update the Protocol and each Item type to include an optional parameter in their respective.hit()
functions to handle and respond to things in their environment.