This topic is where I can go in-depth in how and why some of the known bugs are occurring.
Plants do not fall when the block under them is removed
Plants make A LOT of noise after being spawned
Pea Pod and Snow Pods only do 2 hearts against zombies, not all undead
Repeater fires at the same rate as the Pea Shooter
All plants sound like cows on death
Plants will not always attack hostile mobs
Bug) Plants do not fall when the block under them is removed & Plants make A LOT of noise after being spawned
Answer) One of the main aspects of plants is that THEY DO NOT WALK AROUND! If they did, you could never get them to stay in one place, mainly around you and your home. Unfortunately, the only way I have currently found to fix this is to, while they are alive, infinitely teleport them (reset their x y z coordinates) to their previous position. Basically what the code is doing, is if the entity (the plant) is living (which is defined in the method onLivingUpdate), I reset their coordinates to the position they were last tick. A tick is 1/20 of a second. So for every second, there are 20 ticks. If the plant is alive, on every tick they will be reset to their last position. This does not currently calculate if there is air beneath them. I tried to fix it earlier, but they would end up spawning inside the next solid block beneath them, therefore killing the plant.
Bug) Repeater fires at the same rate as the Pea Shooter
Answer) As we all know, the Repeater plant is supposed to shoot 2 pods at the target. The reason this is occurring, is because when the plant goes to attack its target, it spawns a singular pod in the direction of the target entity. If I set the code to spawn two of them, it would spawn two, simultaneously. When I find a way to delay minecraft spitfire, without delaying the entire game, I will implement this. For now they just have greater health.
Bug) All plants sound like cows on death
Answer) Haha this was kind of a little joke I am playing until I can code in custom sounds. If you want them to just be silent, let me know It isnt really a bug haha!
Bug) Plants will not always attack hostile mobs
Answer) To be completely honest, I am not entirely sure why this sometimes happens. I will have to look into it. For now, I hope you are just happy with fortifying your plants and base in hope that the plants WONT fizzle.
UPDATE: I believe I found out why they wouldnt attack all the time. I believe it is because the AI said they were to look idle or look at the player first, before going on and using the ranged attack. I fixed that, so when the 1.4 release (or what ever I release after 1.3) comes out, this should be fixed.
Bug) Pea Pod and Snow Pods only do 2 hearts against zombies, not all undead
Answer) Actually, I think I fixed this one. If it happens to occur, please tell me!
If you want to comment, help fix, or help me code more plants and fix bugs, feel free to PM me!