@EventHandler
    public void onMoonPhaseChange(MoonPhaseChangedEvent event)
    {
        for(BlockData data : blockData)
        {
            Block block = toBlock(data);
            
            if(isValid(block))
            {
                if(block.getWorld() == event.getWorld())
                {
                    MoonPhase worldMoonPhase = MoonPhase.getMoonPhase(event.getWorld());
                    MoonPhase targetMoonPhase = MoonPhase.values()[data.getMoon_phase()];
                    
                    String blockType = worldMoonPhase == targetMoonPhase
                            ? data.getSpecial_block() 
                            : data.getNormal_block();
                    
                    Material materialToChangeTo = Material.matchMaterial(blockType);
                    
                    if(materialToChangeTo != null)
                    {
                        Material currentMaterial = block.getType();
                        
                        if(currentMaterial != materialToChangeTo)
                        {
                            block.setType(materialToChangeTo);
                        }
                    }
                }
            }
        }
    }