int i = 0 ;
if (!state.getValue(DECAYABLE).booleanValue()) {
i = 0;
}
i will never be 1, DECAYABLE is not encoded in metadata.
if (state.getValue(CHECK_DECAY).booleanValue()) {
i |= 0x4;
}
DECAYABLE, (meta & 0x4) == 0
Here you check bit 4 (where you encoded CHECK_DECAY) and if that bit is 0, you set DECAYABLE to true.
CHECK_DECAY, (meta & 0x8) > 0
Here you check bit 8 (which is never set) and if set, set CHECK_DECAY to true.
Also, CHECK_DECAY and DECAYABLE already exist in BlockLeaves. Rather than create a new property with the same name and same allowed values, just use the one that already exists.
(It's a compatibility thing: if some other mod wants to manipulate with states of your block, but your block doesn't have the desired property (because you created a new one), they can't fiddle with it).
Entities should only be spawned on the logical server (i.e. when World#isRemote is false), which will automatically notify all clients in the area that the entity has spawned.
Spawning entities on both sides will create a ghost entity.
If you iterate from 0 to size, and remove one, you'll skip over another.
If you want to be able to modify the list while you're looping over it, you should use an iterator.